summaryrefslogtreecommitdiff
path: root/lib/coderay/encoders/helpers/html_css.rb
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2005-11-04 00:16:58 +0000
committermurphy <murphy@rubychan.de>2005-11-04 00:16:58 +0000
commit7371093d78689728c1bf8326987c24f73864edb2 (patch)
tree5707450828c5f8f816413b0a64e35d56c9fafec2 /lib/coderay/encoders/helpers/html_css.rb
parent4d5b6c59075ea5435a8ac1879453f21247b38604 (diff)
downloadcoderay-7371093d78689728c1bf8326987c24f73864edb2.tar.gz
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
Diffstat (limited to 'lib/coderay/encoders/helpers/html_css.rb')
-rw-r--r--lib/coderay/encoders/helpers/html_css.rb13
1 files changed, 6 insertions, 7 deletions
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