diff options
-rw-r--r-- | lib/coderay/scanners/diff.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/coderay/scanners/diff.rb b/lib/coderay/scanners/diff.rb index fd12922..34eb158 100644 --- a/lib/coderay/scanners/diff.rb +++ b/lib/coderay/scanners/diff.rb @@ -50,7 +50,9 @@ module Scanners if match = scan(/.*?(?=$|[\t\n\x00]| \(revision)/) encoder.text_token match, :filename if options[:highlight_code] - content_scanner = scanners[FileType.fetch(match, :plaintext)] + file_type = FileType.fetch(match, :text) + file_type = :text if file_type == :diff + content_scanner = scanners[file_type] content_scanner_entry_state = nil end end |