1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-05 18:32:30 +01:00

Fix syntax highlighting of line continuation

Thix fixes an exception being thrown when the
line being continued is the last one.
This commit is contained in:
Raymond Hill 2020-04-13 14:26:17 -04:00
parent 94935a4b9e
commit 051cb27f9b
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -121,7 +121,10 @@ CodeMirror.defineMode("ubo-static-filtering", function() {
if ( line.endsWith(' \\') ) {
do {
line = stream.lookAhead(lines.length);
if ( line.startsWith(' ') === false ) { break; }
if (
line === undefined ||
line.startsWith(' ') === false
) { break; }
lines.push(line);
} while ( line.endsWith(' \\') );
}