summaryrefslogtreecommitdiff
path: root/lib/coderay
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2010-05-05 13:29:11 +0000
committermurphy <murphy@rubychan.de>2010-05-05 13:29:11 +0000
commit3ba349bd7ba1df8e84f7b215e770d7192758666a (patch)
treeef49e78127827a34e8256583843c9e91b7d749db /lib/coderay
parent7b4acdd55492c8cb7db2fba4739b45d5955698de (diff)
downloadcoderay-3ba349bd7ba1df8e84f7b215e770d7192758666a.tar.gz
Fixed a problem with line tokens when using :hint => :debug in the HTML encoder.
Diffstat (limited to 'lib/coderay')
-rw-r--r--lib/coderay/encoders/html.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/coderay/encoders/html.rb b/lib/coderay/encoders/html.rb
index 0a55a02..f14c1cc 100644
--- a/lib/coderay/encoders/html.rb
+++ b/lib/coderay/encoders/html.rb
@@ -191,7 +191,7 @@ module Encoders
@css_style = Hash.new do |h, k|
c = Tokens::AbbreviationForKind[k.first]
h[k.dup] =
- if c != :NO_HIGHLIGHT or hint
+ if c != :NO_HIGHLIGHT or (hint && k.first != :space)
if hint
title = HTML.token_path_to_hint hint, k
end
@@ -207,7 +207,7 @@ module Encoders
@css_style = Hash.new do |h, k|
classes = k.map { |c| Tokens::AbbreviationForKind[c] }
h[k.dup] =
- if classes.first != :NO_HIGHLIGHT or hint
+ if classes.first != :NO_HIGHLIGHT or (hint && k.first != :space)
if hint
title = HTML.token_path_to_hint hint, k
end