aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/LexBash.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/LexBash.cxx b/src/LexBash.cxx
index 64c9bad2a..903d793bb 100644
--- a/src/LexBash.cxx
+++ b/src/LexBash.cxx
@@ -445,7 +445,7 @@ static void ColouriseBashDoc(unsigned int startPos, int length, int initStyle,
HereDoc.Quoted = false;
HereDoc.DelimiterLength = 0;
HereDoc.Delimiter[HereDoc.DelimiterLength] = '\0';
- if (chNext == '\'') { // a quoted here-doc delimiter (' only)
+ if (chNext == '\'' || chNext == '\"') { // a quoted here-doc delimiter (' or ")
i++;
ch = chNext;
chNext = chNext2;
@@ -454,8 +454,9 @@ static void ColouriseBashDoc(unsigned int startPos, int length, int initStyle,
HereDoc.Indent = true;
HereDoc.State = 0;
} else if (isalpha(chNext) || chNext == '_' || chNext == '\\'
- || chNext == '-' || chNext == '+') {
+ || chNext == '-' || chNext == '+' || chNext == '!') {
// an unquoted here-doc delimiter, no special handling
+ // TODO check what exactly bash considers part of the delim
} else if (chNext == '<') { // HERE string <<<
i++;
ch = chNext;
@@ -489,7 +490,7 @@ static void ColouriseBashDoc(unsigned int startPos, int length, int initStyle,
HereDoc.Delimiter[HereDoc.DelimiterLength] = '\0';
}
} else { // an unquoted here-doc delimiter
- if (isalnum(ch) || ch == '_' || ch == '-' || ch == '+') {
+ if (isalnum(ch) || ch == '_' || ch == '-' || ch == '+' || ch == '!') {
HereDoc.Delimiter[HereDoc.DelimiterLength++] = ch;
HereDoc.Delimiter[HereDoc.DelimiterLength] = '\0';
} else if (ch == '\\') {