summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners/diff.rb
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2013-06-10 01:44:16 +0200
committerKornelius Kalnbach <murphy@rubychan.de>2013-06-10 01:44:16 +0200
commit4ffc0afac656bef8a897023711cad7f3ca92a5fc (patch)
tree6637d5a2f48078d9db6459e73306402c4ee4dddb /lib/coderay/scanners/diff.rb
parent02e1bf3c236778197627fe9f9a7b3cf126825a8b (diff)
parent2de5dab7d59021622dabf4728e0b8123dc29da8a (diff)
downloadcoderay-4ffc0afac656bef8a897023711cad7f3ca92a5fc.tar.gz
Merge branch 'master' into bash-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 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)