Closed
Bug 702994
Opened 14 years ago
Closed 14 years ago
File Viewer syntax highlighting broken with single quote mark
Categories
(addons.mozilla.org Graveyard :: Admin/Editor Tools, defect)
addons.mozilla.org Graveyard
Admin/Editor Tools
Tracking
(Not tracked)
VERIFIED
FIXED
Q2 2012
People
(Reporter: eviljeff, Unassigned)
References
()
Details
(Whiteboard: [ReviewTeam])
The file viewer seems to have occasional trouble handling some single quotes. In the URL link you should be able to see the closing ' of the string ignored so the following lines in the files shown as part of a string rather than executable code.
this is the line:
[var toolbar_container = document.createElement('hbox');]
Comment 1•14 years ago
|
||
The syntax highlighter should give up on any strings at the end of a line unless the line ends in a backslash. I see this all the time and wind up using an external diff viewer as a result.
Comment 2•14 years ago
|
||
The following seems to do the trick:
$.extend(SyntaxHighlighter.regexLib, {
multiLineDoubleQuotedString: /"([^\\"\n]|\\[^])*"/g,
multiLineSingleQuotedString: /'([^\\'\n]|\\[^])*'/g
});
| Reporter | ||
Updated•14 years ago
|
Whiteboard: [ReviewTeam]
Target Milestone: --- → Q2 2012
| Reporter | ||
Comment 3•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 4•14 years ago
|
||
https://addons-dev.allizom.org/en-US/firefox/files/browse/108763/file/content/alxtb2ff.js#L1280
https://addons.mozilla.org/en-US/firefox/files/browse/108763/file/content/alxtb2ff.js#L1280
Status: RESOLVED → VERIFIED
| Assignee | ||
Updated•10 years ago
|
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•