Skip to content

Commit 8cd5d22

Browse files
Update src/languages/toml.js
Co-authored-by: Dmitry Sharabin <dmitrysharabin@gmail.com>
1 parent f543e4f commit 8cd5d22

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/languages/toml.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ export default {
1414
'table': {
1515
// keep entire table header (including brackets) under one parent token
1616
pattern: RegExp(
17-
'(^[\\t ]*)(?:\\[(?!\\[)\\s*' + dottedKey + '\\s*\\]' + trailingComment +
18-
'|\\[\\[\\s*' + dottedKey + '\\s*\\]\\]' + trailingComment + ')',
17+
'(^[\\t ]*)(?:\\[\\[\\s*' +
18+
dottedKey +
19+
'\\s*\\]\\]|\\[\\s*' +
20+
dottedKey +
21+
'\\s*\\])(?!\\])',
1922
'm'
2023
),
2124
lookbehind: true,

0 commit comments

Comments
 (0)