With lexer.cpp.backquoted.strings enabled and the following string:
1 `foo\
2 bar`
3 plain text
Line 3 will not highlight as plain text AFTER moving to the beginning of Line 2 and pressing the spacebar or inserting any other character. (It will highlight as a raw string instead.) This appears to be the case due to the line continuation handling not propagating the rawStringTerminator to the next line. The patch below (authored by ActiveState) fixes this.
Around line 758
// Handle line continuation generically.
if (sc.ch == '\\') {
if (static_cast<int>((sc.currentPos+1)) >= lineEndNext) {
lineCurrent++;
lineEndNext = styler.LineEnd(lineCurrent);
vlls.Add(lineCurrent, preproc);
+ if (rawStringTerminator != "") {
+ rawSTNew.Set(lineCurrent-1, rawStringTerminator);
+ }
sc.Forward();
if (sc.ch == '\r' && sc.chNext == '\n') {
// Even in UTF-8, \r and \n are separate
sc.Forward();
}
continuationLine = true;
sc.Forward();
continue;
}
}
Committed as [36a45b].
Related
Commit: [36a45b]