summaryrefslogtreecommitdiff
path: root/lib/coderay/token_kinds.rb
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2016-02-13 15:57:11 +0100
committerKornelius Kalnbach <murphy@rubychan.de>2016-02-13 15:57:11 +0100
commit8d908474eff99a0a653bbc94f459537d56b83e92 (patch)
tree4b066ea50ca5f95f07782d0c58f8081c4c3ef39f /lib/coderay/token_kinds.rb
parentbf395bd14ed7f63aab84955f6768f59965e3a73e (diff)
parent0a1f500d524ff0fb5eeafef051ccbb641954a87a (diff)
downloadcoderay-cleanup-output.tar.gz
Merge branch 'master' into cleanup-outputcleanup-output
Diffstat (limited to 'lib/coderay/token_kinds.rb')
-rwxr-xr-xlib/coderay/token_kinds.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/coderay/token_kinds.rb b/lib/coderay/token_kinds.rb
index 9137a49..f911862 100755
--- a/lib/coderay/token_kinds.rb
+++ b/lib/coderay/token_kinds.rb
@@ -1,10 +1,7 @@
module CodeRay
# A Hash of all known token kinds and their associated CSS classes.
- TokenKinds = Hash.new do |h, k|
- warn 'Undefined Token kind: %p' % [k] if $CODERAY_DEBUG
- false
- end
+ TokenKinds = Hash.new(false)
# speedup
TokenKinds.compare_by_identity if TokenKinds.respond_to? :compare_by_identity
@@ -83,5 +80,6 @@ module CodeRay
:plain => false # almost all scanners
)
- TokenKinds[:method] = TokenKinds[:function]
+ TokenKinds[:method] = TokenKinds[:function]
+ TokenKinds[:unknown] = TokenKinds[:plain]
end