pkulchenko / ZeroBraneStudio

Lightweight Lua-based IDE for Lua with code completion, syntax highlighting, live coding, remote debugger, and code analyzer; supports Lua 5.1, 5.2, 5.3, 5.4, LuaJIT and other Lua interpreters on Windows, macOS, and Linux
http://studio.zerobrane.com/
Other
2.61k stars 519 forks source link

Multiline string/comment syntax highlighting works incorrectly #1045

Closed steveRoll-git closed 4 years ago

steveRoll-git commented 4 years ago

If you type two left square brackets ([[) inside of a multiline comment or string, anything after the end of the multiline part will still be highlighted when it's not supposed to. For example, if you type this:

thing = [[ [[ ]]
abcdwxyz = 9

It will look like this in the editor: image

pkulchenko commented 4 years ago

Yes, it's a defect in Scintilla lexer, which takes inner [[ as a start of a new multi-line comment (which it's not supposed to do). Unfortunately, there is not much that can be done in the IDE (short of ignoring the issue), as this is the latest Scintilla code that is available in wxwidgets (which is the toolkit that the IDE is built with).