summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners/diff.rb
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2013-06-23 06:30:24 +0200
committerKornelius Kalnbach <murphy@rubychan.de>2013-06-23 06:30:24 +0200
commit755904f7046d8a8d6208fe8367aaa3b9a19ecd65 (patch)
tree7179bcbffe257d6482025f8ce09bc82eaa0d8cb1 /lib/coderay/scanners/diff.rb
parent4327fcbe932ac913f7eb8e92497f97913fb398c5 (diff)
downloadcoderay-755904f7046d8a8d6208fe8367aaa3b9a19ecd65.tar.gz
avoid empty tokens in Diff scanner
Diffstat (limited to 'lib/coderay/scanners/diff.rb')
-rw-r--r--lib/coderay/scanners/diff.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/coderay/scanners/diff.rb b/lib/coderay/scanners/diff.rb
index af0f755..fd1aed6 100644
--- a/lib/coderay/scanners/diff.rb
+++ b/lib/coderay/scanners/diff.rb
@@ -69,7 +69,7 @@ module Scanners
state = :added
elsif match = scan(/\\ .*/)
encoder.text_token match, :comment
- elsif match = scan(/@@(?>[^@\n]*)@@/)
+ elsif match = scan(/@@(?>[^@\n]+)@@/)
content_scanner.state = :initial unless match?(/\n\+/)
content_scanner_entry_state = nil
if check(/\n|$/)