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 3653123 commit c073e4dCopy full SHA for c073e4d
lib/coderay/scanners/diff.rb
@@ -50,7 +50,9 @@ def scan_tokens encoder, options
50
if match = scan(/.*?(?=$|[\t\n\x00]| \(revision)/)
51
encoder.text_token match, :filename
52
if options[:highlight_code]
53
- content_scanner = scanners[FileType.fetch(match, :plaintext)]
+ file_type = FileType.fetch(match, :text)
54
+ file_type = :text if file_type == :diff
55
+ content_scanner = scanners[file_type]
56
content_scanner_entry_state = nil
57
end
58
0 commit comments