Skip to content

Commit 97c0793

Browse files
author
Chris K
committed
Fix for DFL-3245, Syntax error thrown when selecting script with very long lines
1 parent 4d3a802 commit 97c0793

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/syntaxhighlight/js/tokenizer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ cls.SimpleJSParser.prototype = new function()
774774
// Opera 12 will no longer have that limit, so this is just temporary.
775775
if (__char_count > __max_line_chars)
776776
{
777-
__buffer = __buffer.slice(0, __buffer.length - (__char_count - __max_line_chars));
777+
__buffer = "";
778778
__has_hit_max_line_chars = true;
779779
}
780780
switch (__type)

0 commit comments

Comments
 (0)