summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners/diff.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/coderay/scanners/diff.rb')
-rw-r--r--lib/coderay/scanners/diff.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/coderay/scanners/diff.rb b/lib/coderay/scanners/diff.rb
index fd70016..52e23d5 100644
--- a/lib/coderay/scanners/diff.rb
+++ b/lib/coderay/scanners/diff.rb
@@ -49,7 +49,7 @@ module Scanners
encoder.text_token match, :head
if match = scan(/.*?(?=$|[\t\n\x00]| \(revision)/)
encoder.text_token match, :filename
- if options[:highlight_code]
+ if options[:highlight_code] && match != '/dev/null'
file_type = FileType.fetch(match, :text)
file_type = :text if file_type == :diff
content_scanner = scanners[file_type]