What steps will reproduce the problem?
1. Syntax highlight the following HTML:
<!-- Comment 1 -->Some Text<!-- Comment 2 -->
What is the expected output?
The comments should be green, the text should be black.
What do you see instead?
The whole line is green
What version of the product are you using? On what operating system?
1.5.0, Cross platform
Please provide any additional information below.
The regex is too greedy. It looks like you already attempted to solve
this, but missed slightly. Here's the existing code in shBrushXml.js:
// Match comments
// <!--\s*.*\s*?-->
this.GetMatches(new RegExp('<!--\\s*.*\\s*?-->', 'gm'), 'comments');
Here's the corrected code:
// Match comments
// <!--\s*.*?\s*-->
this.GetMatches(new RegExp('<!--\\s*.*?\\s*-->', 'gm'), 'comments');
Just move the '?' to the previous token.
Original issue reported on code.google.com by neil.fra...@gmail.com on 25 Jun 2007 at 1:13
Original issue reported on code.google.com by
neil.fra...@gmail.com
on 25 Jun 2007 at 1:13