vscode-logfile-highlighter icon indicating copy to clipboard operation
vscode-logfile-highlighter copied to clipboard

XML syntax error in log.tmLanguage

Open sebthom opened this issue 2 years ago • 3 comments

The file https://github.com/emilast/vscode-logfile-highlighter/blob/master/syntaxes/log.tmLanguage is not well formed in lines 42, 69, 96, 123, 150, 168, 239, 279, This prevents it from being read by an XML parser. It contains an unescaped a left angle bracket (<):

<string>(?<=^[\s\d\p]*)\bV\b</string>

Possible solutions are:

<string>(?&lt;=^[\s\d\p]*)\bV\b</string>

or using CDATA:

<string><![CDATA[(?<=^[\s\d\p]*)\bV\b]]></string>

sebthom avatar Oct 19 '22 10:10 sebthom

XML cannot be parsed with regex, that is a well known limitation.

ssbarnea avatar Nov 25 '22 13:11 ssbarnea

@ssbarnea I don't understand your comment. my issue says nothing about parsing XML with regex. I am saying the tmLanguage file - which is an XML file - is not well formed, i. e. does not have characters escaped as required by the XML spec.

sebthom avatar Nov 25 '22 14:11 sebthom

Oops, sorry I got the wrong impression.

ssbarnea avatar Nov 25 '22 14:11 ssbarnea