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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
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
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).
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
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