diff options
author | murphy <murphy@rubychan.de> | 2010-09-22 01:12:24 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2010-09-22 01:12:24 +0000 |
commit | 275febc7a310a4826adbe98458a5a0c4dc3eca12 (patch) | |
tree | abb4416ed697063ff6aab3385aae8b8fb1e09903 /lib | |
parent | c1ec72d1ea5a4f150802fa3b8b42f850d0479882 (diff) | |
download | coderay-275febc7a310a4826adbe98458a5a0c4dc3eca12.tar.gz |
Fixed line token classes when using hints.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/coderay/encoders/html.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/coderay/encoders/html.rb b/lib/coderay/encoders/html.rb index c59ee03..6e57855 100644 --- a/lib/coderay/encoders/html.rb +++ b/lib/coderay/encoders/html.rb @@ -271,7 +271,11 @@ module Encoders # whole lines to be highlighted, eg. a deleted line in a diff def begin_line kind if style = @css_style[@last_opened ? [kind, *@opened] : kind] - @out << style.sub('<span class="', '<span class="line ') + if style['class="'] + @out << style.sub('class="', 'class="line ') + else + @out << style.sub('>', ' class="line">') + end else @out << '<span class="line">' end |