aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/ScintillaWidget.h
diff options
context:
space:
mode:
authorColomban Wendling <ban@herbesfolles.org>2013-11-18 17:44:22 +0100
committerColomban Wendling <ban@herbesfolles.org>2013-11-18 17:44:22 +0100
commit498727a1cee6430572cd403eb4732386fdc8e7ef (patch)
tree1717b9195f3484137e0482faf096e17d37f3aec7 /include/ScintillaWidget.h
parent1e541f86974e08c1e7e5ce2daec84f883c8fdcdd (diff)
downloadscintilla-mirror-498727a1cee6430572cd403eb4732386fdc8e7ef.tar.gz
Bash: fix comment detection inside a word
A comment in bash is defined as "[...] a word beginning with # causes that word and all remaining characters on that line to be ignored". A word is defined as "a sequence of characters considered as a single unit by the shell"; and there is a set of metacharacters defined as "a character that, when unquoted, separates words. One of the following: | & ; ( ) < > space tab". In practice, "foo#bar" is one single word, not "foo" followed by a comment. Trickier, "foo\;#bar" is also a single word, but "foo;bar" are 2 words and a control character. So, fix the Bash lexer to check whether the character preceding the hash sign to be either a metacharacter or part of a word. A maybe better fix would be to understand the Bash conception of a word, and analyze those, but it would require a large rewrite.
Diffstat (limited to 'include/ScintillaWidget.h')
0 files changed, 0 insertions, 0 deletions