summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners/diff.rb
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2013-06-11 18:10:54 +0200
committerKornelius Kalnbach <murphy@rubychan.de>2013-06-11 18:10:54 +0200
commit916711c9983483c39f9a68c29e21a0ed40004bd2 (patch)
treea3a98ac92db67a75625525b4d559b7db7ac89965 /lib/coderay/scanners/diff.rb
parent0c98047ea276f393daa8249cf9c124ebc08266d2 (diff)
parent2e4e83bf84282d6ce7fbc9eeff2cbe1c79788a9b (diff)
downloadcoderay-916711c9983483c39f9a68c29e21a0ed40004bd2.tar.gz
Merge branch 'master' into paint-integration
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)