From ff966c0079404c285925bab3900a74ad9f60058f Mon Sep 17 00:00:00 2001 From: Kornelius Kalnbach Date: Wed, 26 Oct 2011 13:38:19 +0200 Subject: minor fix in diff scanner, .tmproj filetype: 1.0.3 --- lib/coderay/helpers/file_type.rb | 1 + lib/coderay/scanners/diff.rb | 2 +- lib/coderay/version.rb | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/coderay') diff --git a/lib/coderay/helpers/file_type.rb b/lib/coderay/helpers/file_type.rb index cbe0bfc..7b90918 100644 --- a/lib/coderay/helpers/file_type.rb +++ b/lib/coderay/helpers/file_type.rb @@ -119,6 +119,7 @@ module CodeRay # 'sch' => :scheme, 'sql' => :sql, # 'ss' => :scheme, + 'tmproj' => :xml, 'xhtml' => :page, 'xml' => :xml, 'yaml' => :yaml, 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] diff --git a/lib/coderay/version.rb b/lib/coderay/version.rb index e6b8386..2f70f5a 100644 --- a/lib/coderay/version.rb +++ b/lib/coderay/version.rb @@ -1,3 +1,3 @@ module CodeRay - VERSION = '1.0.2' + VERSION = '1.0.3' end -- cgit v1.2.1