diff options
author | murphy <murphy@rubychan.de> | 2010-09-22 00:11:31 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2010-09-22 00:11:31 +0000 |
commit | c1ec72d1ea5a4f150802fa3b8b42f850d0479882 (patch) | |
tree | ff0a4982031681609b655e646bdccf1081d5ee1b /lib/coderay/encoders | |
parent | c78deee04bbacbf5d4d692c196ff65f6e3a4caca (diff) | |
download | coderay-c1ec72d1ea5a4f150802fa3b8b42f850d0479882.tar.gz |
Fix invalid HTML markup for line tokens (use span + CSS instead of div).
Diffstat (limited to 'lib/coderay/encoders')
-rw-r--r-- | lib/coderay/encoders/html.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/coderay/encoders/html.rb b/lib/coderay/encoders/html.rb index 5c90453..c59ee03 100644 --- a/lib/coderay/encoders/html.rb +++ b/lib/coderay/encoders/html.rb @@ -271,9 +271,9 @@ 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', '<div') + @out << style.sub('<span class="', '<span class="line ') else - @out << '<div>' + @out << '<span class="line">' end @opened << kind @last_opened = kind if @options[:css] == :style @@ -285,7 +285,7 @@ module Encoders 'that is not open. Open are: %p.' % [kind, @opened[1..-1]] end if @opened.pop - @out << '</div' + @out << '</span>' @last_opened = @opened.last if @last_opened end end |