From 7371093d78689728c1bf8326987c24f73864edb2 Mon Sep 17 00:00:00 2001 From: murphy Date: Fri, 4 Nov 2005 00:16:58 +0000 Subject: HTML highlighting: html_css.rb: Bugfixes CSS style scanning went for wrong range moved some styles into the right place html_output.rb: numerization excluded templates renamed new LIST template html_numerization.rb (new): new :line_numbers style :list (beta) Benchmarking: Split Options into lines :list style for testing --- lib/coderay/encoders/helpers/html_css.rb | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'lib/coderay/encoders/helpers/html_css.rb') diff --git a/lib/coderay/encoders/helpers/html_css.rb b/lib/coderay/encoders/helpers/html_css.rb index 6629bbf..80ccab4 100644 --- a/lib/coderay/encoders/helpers/html_css.rb +++ b/lib/coderay/encoders/helpers/html_css.rb @@ -12,7 +12,7 @@ module CodeRay module Encoders cl = @classes[styles.first] return '' unless cl style = false - 1.upto(cl.size + 1) do |offset| + 1.upto(styles.size) do |offset| break if style = cl[styles[offset .. -1]] end return style @@ -46,16 +46,14 @@ module CodeRay module Encoders border: 1px solid silver; font-family: 'Courier New', 'Terminal', monospace; color: black; - width: 100%; - padding: 2px; } .CodeRay pre { margin: 0px; } div.CodeRay { } -span.CodeRay { white-space: pre; border: 0; } +span.CodeRay { white-space: pre; border: 0px; padding: 2px; } -table.CodeRay { border-collapse: collapse; } +table.CodeRay { border-collapse: collapse; width: 100%; padding: 2px; } table.CodeRay td { padding: 2px 4px; vertical-align: top; } .CodeRay .line_numbers, .CodeRay .no { @@ -67,8 +65,9 @@ table.CodeRay td { padding: 2px 4px; vertical-align: top; } .CodeRay .no { padding: 0px 4px; } .CodeRay .code { width: 100%; } -.CodeRay .code { -} +ol.CodeRay { font-size: 10pt; } +ol.CodeRay li { white-space: pre; } + .CodeRay .code pre { overflow: auto; } MAIN -- cgit v1.2.1