Closed GoogleCodeExporter closed 8 years ago
I tried shBrushPython.js written by Gheorghe Milas and it worked.
https://svn.enthought.com/enthought/browser/trunk/enthought.chaco2_3.0/enthought
/chaco2/doc/scipy_tuto
rial/Scripts/shBrushPython.js?rev=13597&format=txt
Original comment by lionxia...@gmail.com
on 29 Apr 2008 at 5:00
Agreed, Python brush is 100% broken in all WebKit browsers. The issue is:
SyntaxError: Invalid regular expression: nothing to repeat
file:///C:/Documents%20and%20Settings/fraser/Desktop/html/dp.SyntaxHighlighter/j
s/shBrushPython.js
(line 15)
It is line 10 in the compressed version and line 15 in the uncompressed
version. The
offending line is:
{ regex: new RegExp("'(?!')*(?:\\.|(\\\\\\')|[^\\''\\n\\r])*'", 'gm'), css:
'string' },
Doesn't matter what the Python input is.
Original comment by neil.fra...@gmail.com
on 14 Aug 2008 at 5:37
Confirming that the alternative shBrushPython.js in comment 1 works great.
As for the bug in the original regex, it boils down to RegExp("(?!x)*y") which
is a
negative look-ahead assertion. But neither I nor WebKit can figure out what
the * is
for. Deleting the * solves the problem and makes Python render fine.
Original comment by neil.fra...@gmail.com
on 14 Aug 2008 at 5:57
Thanks, Neil, for figuring it out. I ran into the problem with Safari 3 and
removed
the * in shBrushPython.js. (This is from the current RAR downloads, 1.5.1, I
think.)
Works like a charm now.
Original comment by billk...@gmail.com
on 18 Aug 2008 at 9:07
fixed in the trunk
Original comment by alex.gor...@gmail.com
on 9 Oct 2008 at 12:43
Original issue reported on code.google.com by
guyon.mo...@gmail.com
on 25 Jan 2008 at 10:39