#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

  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2012-10-18

    minimal testcase

     
    Last edit: Anonymous 2014-12-05
  • 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-04-01
    • status: open-fixed --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks