From 3ba349bd7ba1df8e84f7b215e770d7192758666a Mon Sep 17 00:00:00 2001 From: murphy Date: Wed, 5 May 2010 13:29:11 +0000 Subject: Fixed a problem with line tokens when using :hint => :debug in the HTML encoder. --- lib/coderay/encoders/html.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/coderay') 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 -- cgit v1.2.1