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:
parent
94935a4b9e
commit
051cb27f9b
@ -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(' \\') );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user