diff options
-rw-r--r-- | Changes.textile | 10 | ||||
-rw-r--r-- | lib/coderay/helpers/file_type.rb | 1 | ||||
-rw-r--r-- | lib/coderay/scanners/diff.rb | 2 | ||||
-rw-r--r-- | lib/coderay/version.rb | 2 |
4 files changed, 13 insertions, 2 deletions
diff --git a/Changes.textile b/Changes.textile index 9135f67..84cf31e 100644 --- a/Changes.textile +++ b/Changes.textile @@ -4,6 +4,16 @@ p=. _This files lists all changes in the CodeRay library since the 0.9.8 release {{toc}} +h2. Changes in 1.0.3 + +New: + +* .tmproj files are recognized as XML. + +Fixes: + +* Removed files are highlighted inside diffs generated by git. + h2. Changes in 1.0.2 Fixes: 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 |