Skip to content

Commit a420232

Browse files
committed
Fix leakage of comment scope in doc blocks
Limit block comment documentation. Refs: #11
1 parent c689497 commit a420232

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Syntaxes/Lua.plist

+2-2
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@
680680
<key>begin</key>
681681
<string>(?&lt;=/\*\*)([^*]|\*(?!/))*$</string>
682682
<key> </key>
683-
<string>(^|\G)[ \t]*\*(?!/)(?=([^*]|[*](?!/))*$)</string>
683+
<string>^[ \t]*\*(?!/)(?=([^*]|[*](?!/))*$)</string>
684684
<key>patterns</key>
685685
<array>
686686
<dict>
@@ -698,7 +698,7 @@
698698
<key>begin</key>
699699
<string>(?&lt;=--\[\[)([^-]|\-(?!\]\]))*$</string>
700700
<key>while</key>
701-
<string>(^|\G)[ \t]*-*(?!\]\])(?=([^-]|[-](?!\]\]))*$)</string>
701+
<string>^[ \t]*-*(?!\]\])(?=([^-]|[-](?!\]\]))*$)</string>
702702
<key>patterns</key>
703703
<array>
704704
<dict>

lua.tmLanguage.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@
439439
},
440440
"comment_documentation_asterisk": {
441441
"begin": "(?<=/\\*\\*)([^*]|\\*(?!/))*$",
442-
" ": "(^|\\G)[ \\t]*\\*(?!/)(?=([^*]|[*](?!/))*$)",
442+
" ": "^[ \\t]*\\*(?!/)(?=([^*]|[*](?!/))*$)",
443443
"patterns": [
444444
{
445445
"include": "#emmydoc"
@@ -451,7 +451,7 @@
451451
},
452452
"comment_documentation_bracket": {
453453
"begin": "(?<=--\\[\\[)([^-]|\\-(?!\\]\\]))*$",
454-
"while": "(^|\\G)[ \\t]*-*(?!\\]\\])(?=([^-]|[-](?!\\]\\]))*$)",
454+
"while": "^[ \\t]*-*(?!\\]\\])(?=([^-]|[-](?!\\]\\]))*$)",
455455
"patterns": [
456456
{
457457
"include": "#emmydoc"

0 commit comments

Comments
 (0)