Menu

Matlab Syntax Highlighting Bug(?)

2009-09-02
2012-11-13
  • bruteforcexyz

    bruteforcexyz - 2009-09-02

    When Notepad++ sees a backslash followed by a single quote using Matlab highlighting, everything after it is colored gray (text).

    Example:
    dirRoot = pwd;
    dir = [dirRoot,'/xyz'];
    dir = regexprep(dir, '\', '/');
    addpath(dirRoot);
    addpath(dir);

    Notice that all characters following the \' is gray -- it seems to treat the two characters as some sort of escape sequence and thus never closes the string.  Anyone have a fix/workaround for this?

     
    • cchris

      cchris - 2009-09-02

      Are you using v5.4.5? The code in LexMatlab.cxx shows proper support for escaping the quotes, and I remember it was fixed in some recent version of Notepad++.

      CChris

       
      • François-R Boyer

        I confirm the problem in v5.4.5. The backslash is interpreted as an escape character, while in Matlab it is not an escape (to put a quote inside a quote, two quote characters are used).

         
  • bruteforcexyz

    bruteforcexyz - 2009-10-05

    Has this problem been addressed?  Looking at old messages, it seems that someone reported this exact same problem back in June of 2008.  I'm still optimistic that this bug can be fixed soon.

    Old Message that I think first reported this bug: mathewkelson 2008-06-25 19:27:58 PDT

     
  • cchris

    cchris - 2009-10-06

    Does Matlab support the \' construct (backslash + quote)? If so, and the highligher doesn't comply, this a Scintilla lexer bug, to be reorted to the Scintilla project. The current policy is to possibly add to Scintilla's files, but not to change them. Scintilla is a project completly independent from Notepad++.

    CChris

     
MongoDB Logo MongoDB