You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This works fine unless the document contains the word undefined.
I guess this is a "end is undefined" issue where undefined is taken literally.
The issue can be avoided by setting end to a never-matching regexp (like <key>end</key><string>^\b$</string>). And maybe that could be put into the highlighting code: if undefined, use ^\b$ instead of the string undefined.
I think we never ran into this because a grammar with a begin statement and a missing end statement is illegal... So our resolution could be to throw the entire rule out.
It's your decision. All I can say is that I read the documentation differently. (My understanding of "If there is no match for the end pattern, the end of the document is used." was that I can leave out the end to achieve a match till the end of the document.)
From @mhchem on April 25, 2018 9:20
With this simplified
.tmLanguage
file, the whole document should be formatted a comment (because I use abegin
without andend
).This works fine unless the document contains the word
undefined
.I guess this is a "
end
is undefined" issue whereundefined
is taken literally.The issue can be avoided by setting
end
to a never-matching regexp (like<key>end</key><string>^\b$</string>
). And maybe that could be put into the highlighting code: if undefined, use^\b$
instead of the stringundefined
.Copied from original issue: microsoft/vscode#48654
The text was updated successfully, but these errors were encountered: