Page MenuHomePhabricator

JavaScript Regexp syntax highlighting does not support literal strings
Closed, ResolvedPublic

Description

Author: manishsmail

Description:
In JavaScript, if a regexp has a literal quotation mark, ("), the text is highlighted as if the " was a string boundary:
<Source lang="javascript">
var s="\"abcd\"abcd\""
creates string: "abcd"abcd" (the "s ar literal)
remove all "s with the regxp: /"/g
s.replace(/\"/g,"")
This code is supposed to be green, but is blue, as the literal quotation mark in the regxp is treated as a string boundary
var colorRectifier = "\""
To correct the syntax highlighting, you have to add a dummy string containing a literal "
</source>


Version: unspecified
Severity: enhancement
URL: http://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)#JS_syntax_highighting_RegExp_error

Details

Reference
bz15175

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:21 PM
bzimport added a project: SyntaxHighlight.
bzimport set Reference to bz15175.
bzimport added a subscriber: Unknown Object (MLST).

This is a GeSHi bug which is fixed in the latest version. Marking this as a duplicate of 10967.

*** This bug has been marked as a duplicate of bug 10967 ***