summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners/diff.rb
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2011-08-19 05:40:06 +0200
committerKornelius Kalnbach <murphy@rubychan.de>2011-08-19 05:40:06 +0200
commitc073e4d256354d0d25fa65d1bfb0ab754198ff0a (patch)
treec1b66b5e3fb40b4cbb4c51454313815307a25abd /lib/coderay/scanners/diff.rb
parent36531238fa4ef33f1792c6ea6de5e00dcadf018a (diff)
downloadcoderay-c073e4d256354d0d25fa65d1bfb0ab754198ff0a.tar.gz
fix issue with diffs inside of diffs
Diffstat (limited to 'lib/coderay/scanners/diff.rb')
-rw-r--r--lib/coderay/scanners/diff.rb4
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