We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4323bb7 commit 1ad7564Copy full SHA for 1ad7564
lib/coderay/scanners/diff.rb
@@ -45,7 +45,7 @@ def scan_tokens encoder, options
45
if match = scan(/--- |\+\+\+ |=+|_+/)
46
encoder.begin_line line_kind = :head
47
encoder.text_token match, :head
48
- if match = scan(/.+?(?=$|[\t\n\x00]| \(revision)/)
+ if match = scan(/[^\x00\n]+?(?=$|[\t\n]| \(revision)/)
49
encoder.text_token match, :filename
50
if options[:highlight_code] && match != '/dev/null'
51
file_type = CodeRay::FileType.fetch(match, :text)
0 commit comments