summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2010-03-31 21:22:43 +0000
committermurphy <murphy@rubychan.de>2010-03-31 21:22:43 +0000
commitc6442f8df01aa0c8d55fa09a001744e1c6e425ae (patch)
treeee53b69c38dc54e350dbbb2f44bf7d2179b2eee4
parentf6645377402a0e7687944d88a4366c9a20523553 (diff)
downloadcoderay-c6442f8df01aa0c8d55fa09a001744e1c6e425ae.tar.gz
Diff scanner highlights unknown lines as :comment instead of :head.
-rw-r--r--Changes.textile32
-rw-r--r--lib/coderay/scanners/diff.rb2
2 files changed, 15 insertions, 19 deletions
diff --git a/Changes.textile b/Changes.textile
index ba19409..78cdfce 100644
--- a/Changes.textile
+++ b/Changes.textile
@@ -43,18 +43,10 @@ h3. @Encoders::TokenKindFilter@
* *RENAMED* from @TokenClassFilter@.
-h3. @Scanners@
+h3. @Scanners::Scanner@
-* *NEW*: Highlighting of code based on file names.
- See ticket "#52":http://redmine.rubychan.de/issues/52.
-
- This is a very original feature. It enables multi-language highlighting for
- diff files, which is especially helpful for CodeRay development itself. The
- updated version of the scanner test suite generated .debug.diff.html files
- using this.
-
- Note: This is still buggy for multi-line tokens.
-* *NEW*: Highlighting of the file name in the change headers as @:filename@.
+* *FIXED* Ruby 1.9.2 compatibility problem (see revision 463).
+* *REMOVED* @String#to_unix@.
h3. @Scanners::Debug@
@@ -65,13 +57,17 @@ h3. @Scanners::Debug@
h3. @Scanners::Diff@
-* *FIXED* Ruby 1.9.2 compatibility problem (see revision 463).
-* *REMOVED* @String#to_unix@.
-
-h3. @Scanners::Scanner@
-
-* *FIXED* Ruby 1.9.2 compatibility problem (see revision 463).
-* *REMOVED* @String#to_unix@.
+* *NEW*: Highlighting of code based on file names.
+ See ticket "#52":http://redmine.rubychan.de/issues/52.
+
+ This is a very original feature. It enables multi-language highlighting for
+ diff files, which is especially helpful for CodeRay development itself. The
+ updated version of the scanner test suite generated .debug.diff.html files
+ using this.
+
+ Note: This is still buggy for multi-line tokens.
+* *NEW*: Highlight the file name in the change headers as @:filename@.
+* *CHANGED*: Highlight unknown lines as @:comment@ instead of @:head@.
h3. @Scanners::JavaScript@
diff --git a/lib/coderay/scanners/diff.rb b/lib/coderay/scanners/diff.rb
index 6ba50ef..4f3ff2e 100644
--- a/lib/coderay/scanners/diff.rb
+++ b/lib/coderay/scanners/diff.rb
@@ -89,7 +89,7 @@ module Scanners
CodeRay.scan code, content_lang, :tokens => tokens
next
elsif scan(/.+/)
- tokens << [:begin_line, line_kind = :head]
+ tokens << [:begin_line, line_kind = :comment]
kind = :plain
else
raise_inspect 'else case rached'