Menu

#1412 LexHTML: JavaScript RegExp literal not always recognized

Bug
closed-fixed
5
2013-04-01
2012-10-18
Anonymous
No

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.

Discussion

  • Neil Hodgson

    Neil Hodgson - 2012-12-30
    • assigned_to: nobody --> nyamatongwe
    • milestone: --> Bug
    • status: open --> open-accepted
     
  • zeniko

    zeniko - 2013-03-10

    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.

     
  • Neil Hodgson

    Neil Hodgson - 2013-03-11
    • labels: Scintilla --> Scintilla, lexer
    • status: open-accepted --> open-fixed
     
  • Neil Hodgson

    Neil Hodgson - 2013-03-11

    Committed fix as [b042cc].

     

    Related

    Commit: [b042cc]

  • Neil Hodgson

    Neil Hodgson - 2013-04-01
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.