summaryrefslogtreecommitdiff
path: root/lib/coderay/encoders/html
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2006-09-28 15:49:53 +0000
committermurphy <murphy@rubychan.de>2006-09-28 15:49:53 +0000
commita3af20bd6c3aef3976d18d49f407613ff7693baf (patch)
tree105f09ec27e217a09bf1b7c678a4cf484cf2182f /lib/coderay/encoders/html
parent6ecba0d804f995d377495997e5edd014486acf65 (diff)
downloadcoderay-a3af20bd6c3aef3976d18d49f407613ff7693baf.tar.gz
Ruby scanner: deleted regexp highlighting (didn't work anyway)
HTML highlighter: unknown token classes now yield a CSS class with that name instead of :error A new Ruby test
Diffstat (limited to 'lib/coderay/encoders/html')
-rw-r--r--lib/coderay/encoders/html/classes.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/coderay/encoders/html/classes.rb b/lib/coderay/encoders/html/classes.rb
index ea15ca0..c8f70d9 100644
--- a/lib/coderay/encoders/html/classes.rb
+++ b/lib/coderay/encoders/html/classes.rb
@@ -3,7 +3,10 @@ module Encoders
class HTML
- ClassOfKind = {
+ ClassOfKind = Hash.new do |h, k|
+ h[k] = k.to_s
+ end
+ ClassOfKind.update with = {
:attribute_name => 'an',
:attribute_name_fat => 'af',
:attribute_value => 'av',
@@ -65,7 +68,7 @@ module Encoders
ClassOfKind[:open] = ClassOfKind[:close] = ClassOfKind[:delimiter]
ClassOfKind[:nesting_delimiter] = ClassOfKind[:delimiter]
ClassOfKind[:escape] = ClassOfKind[:delimiter]
- ClassOfKind.default = ClassOfKind[:error] or raise 'no class found for :error!'
+ #ClassOfKind.default = ClassOfKind[:error] or raise 'no class found for :error!'
end