mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-18 17:02:27 +02: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:
parent
94935a4b9e
commit
051cb27f9b
@ -121,7 +121,10 @@ CodeMirror.defineMode("ubo-static-filtering", function() {
|
|||||||
if ( line.endsWith(' \\') ) {
|
if ( line.endsWith(' \\') ) {
|
||||||
do {
|
do {
|
||||||
line = stream.lookAhead(lines.length);
|
line = stream.lookAhead(lines.length);
|
||||||
if ( line.startsWith(' ') === false ) { break; }
|
if (
|
||||||
|
line === undefined ||
|
||||||
|
line.startsWith(' ') === false
|
||||||
|
) { break; }
|
||||||
lines.push(line);
|
lines.push(line);
|
||||||
} while ( line.endsWith(' \\') );
|
} while ( line.endsWith(' \\') );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user