From c073e4d256354d0d25fa65d1bfb0ab754198ff0a Mon Sep 17 00:00:00 2001 From: Kornelius Kalnbach Date: Fri, 19 Aug 2011 05:40:06 +0200 Subject: fix issue with diffs inside of diffs --- lib/coderay/scanners/diff.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/coderay/scanners/diff.rb') 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 -- cgit v1.2.1