ColouriseHyperTextDoc considers a RegExp literal only as such if it's preceded by '(', '=' or ',' (see isOKBeforeRE). This is inconsistent with what LexerCPP::Lex uses (any of "([{=,:;!%^&*|?~+-") and causes the attached testcase to be wrongly colored. Is there a valid reason for the divergence between LexHTML's and LexCPP's lists? Otherwise thanks for extending LexHTML's list to match LexCPP's.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
minimal testcase
Last edit: Anonymous 2014-12-05
They were identical when added but LexCPP was changed with https://sourceforge.net/tracker/?func=detail&aid=1777016&group_id=2439&atid=102439
I won't be working on this myself.
This patch extends the list to match most of LexCPP's as requested. For the time being, it just still fails in two even rarer edge cases which have since been fixed for LexCPP.
Committed fix as [b042cc].
Related
Commit: [b042cc]