diff options
author | Kornelius Kalnbach <murphy@rubychan.de> | 2019-11-24 15:23:28 +0100 |
---|---|---|
committer | Kornelius Kalnbach <murphy@rubychan.de> | 2019-11-24 15:23:28 +0100 |
commit | 54268a946b9bfde526d6d8c28bdb4c8f956eee32 (patch) | |
tree | 25e133d24be196a048c1a3ab99651e226a87ad98 /lib/coderay/scanners/diff.rb | |
parent | e3228fa76dd8f26ea7e240c67dcd90cea9106d11 (diff) | |
parent | b5b3430d4635682b767c44469e28a70fe234187e (diff) | |
download | coderay-fix-javascript-regexp.tar.gz |
Merge branch 'master' into fix-javascript-regexpfix-javascript-regexp
Diffstat (limited to 'lib/coderay/scanners/diff.rb')
-rw-r--r-- | lib/coderay/scanners/diff.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/coderay/scanners/diff.rb b/lib/coderay/scanners/diff.rb index 74a6c27..a2a6fcc 100644 --- a/lib/coderay/scanners/diff.rb +++ b/lib/coderay/scanners/diff.rb @@ -109,7 +109,7 @@ module Scanners for deleted_line, inserted_line in deleted_lines.zip(inserted_lines) pre, deleted_part, inserted_part, post = diff deleted_line, inserted_line content_scanner_entry_state = content_scanner.state - deleted_lines_tokenized << content_scanner.tokenize([pre, deleted_part, post], :tokens => Tokens.new) + deleted_lines_tokenized << content_scanner.tokenize([pre, deleted_part, post], :tokens => Tokens.new) content_scanner.state = content_scanner_entry_state || :initial inserted_lines_tokenized << content_scanner.tokenize([pre, inserted_part, post], :tokens => Tokens.new) end @@ -212,7 +212,7 @@ module Scanners # does not precede the leftmost one from the left. j = -1 j -= 1 while j >= j_min && a[j] == b[j] - return a[0...i], a[i..j], b[i..j], (j < -1) ? a[j+1..-1] : '' + return a[0...i], a[i..j], b[i..j], (j < -1) ? a[j + 1..-1] : '' end end |