summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners/diff.rb
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2013-06-12 16:04:45 +0200
committerKornelius Kalnbach <murphy@rubychan.de>2013-06-12 16:04:45 +0200
commit69246fc8ed0344eae4dab35286813a00010a08cb (patch)
tree9c4faf0bcc2bb53e7955aff0b139492ea04dbe2e /lib/coderay/scanners/diff.rb
parent34e823d709ce19a480dbd78e72e63ada0d3425fb (diff)
parent40bd2ef5d33d32c3b3987da1d115b717259819e4 (diff)
downloadcoderay-69246fc8ed0344eae4dab35286813a00010a08cb.tar.gz
Merge branch 'master' into lua-scanner
Conflicts: lib/coderay/token_kinds.rb
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 38efaf4..af0f755 100644
--- a/lib/coderay/scanners/diff.rb
+++ b/lib/coderay/scanners/diff.rb
@@ -45,7 +45,7 @@ module Scanners
if match = scan(/--- |\+\+\+ |=+|_+/)
encoder.begin_line line_kind = :head
encoder.text_token match, :head
- if match = scan(/.*?(?=$|[\t\n\x00]| \(revision)/)
+ if match = scan(/[^\x00\n]+?(?=$|[\t\n]| \(revision)/)
encoder.text_token match, :filename
if options[:highlight_code] && match != '/dev/null'
file_type = CodeRay::FileType.fetch(match, :text)