Last modified: 2008-08-15 20:33:41 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T17175, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 15175 - JavaScript Regexp syntax highlighting does not support literal strings
JavaScript Regexp syntax highlighting does not support literal strings
Status: RESOLVED DUPLICATE of bug 10967
Product: MediaWiki extensions
Classification: Unclassified
SyntaxHighlight (GeSHi) (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
http://en.wikipedia.org/wiki/Wikipedi...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-15 14:45 UTC by Manish
Modified: 2008-08-15 20:33 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Manish 2008-08-15 14:45:05 UTC
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>
Comment 1 Daniel Friesen 2008-08-15 20:33:41 UTC
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 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links