summaryrefslogtreecommitdiff
path: root/lib/coderay/encoders
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2011-08-19 05:39:45 +0200
committerKornelius Kalnbach <murphy@rubychan.de>2011-08-19 05:39:45 +0200
commit36531238fa4ef33f1792c6ea6de5e00dcadf018a (patch)
treecca387c2b27dc23d71dab6bd928e10fcdc6cd46b /lib/coderay/encoders
parent5dd7ca65fdb90d6ffe53790abf1fe5a29a66675e (diff)
downloadcoderay-36531238fa4ef33f1792c6ea6de5e00dcadf018a.tar.gz
pretty (longer) token class names; closes #347
Diffstat (limited to 'lib/coderay/encoders')
-rw-r--r--lib/coderay/encoders/html.rb1
-rw-r--r--lib/coderay/encoders/html/numbering.rb2
-rw-r--r--lib/coderay/encoders/html/output.rb4
-rw-r--r--lib/coderay/encoders/terminal.rb6
4 files changed, 5 insertions, 8 deletions
diff --git a/lib/coderay/encoders/html.rb b/lib/coderay/encoders/html.rb
index abbafad..60dfad1 100644
--- a/lib/coderay/encoders/html.rb
+++ b/lib/coderay/encoders/html.rb
@@ -21,7 +21,6 @@ module Encoders
# :line_numbers => :inline,
# :css => :style
# )
- # #-> <span class="no">1</span> <span style="color:#036; font-weight:bold;">Some</span> code
#
# == Options
#
diff --git a/lib/coderay/encoders/html/numbering.rb b/lib/coderay/encoders/html/numbering.rb
index 4e030fd..15ce11b 100644
--- a/lib/coderay/encoders/html/numbering.rb
+++ b/lib/coderay/encoders/html/numbering.rb
@@ -84,7 +84,7 @@ module Encoders
line_number_text = bolding.call line_number
indent = ' ' * (max_width - line_number.to_s.size) # TODO: Optimize (10^x)
line_number += 1
- "<span class=\"no\">#{indent}#{line_number_text}</span>#{open}#{line}#{close}\n"
+ "<span class=\"line-numbers\">#{indent}#{line_number_text}</span>#{open}#{line}#{close}\n"
end
when :table
diff --git a/lib/coderay/encoders/html/output.rb b/lib/coderay/encoders/html/output.rb
index 4f65878..298921e 100644
--- a/lib/coderay/encoders/html/output.rb
+++ b/lib/coderay/encoders/html/output.rb
@@ -124,7 +124,7 @@ module Encoders
TABLE = Template.new <<-TABLE
<table class="CodeRay"><tr>
- <td class="line_numbers" title="double click to toggle" ondblclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }"><pre><%LINE_NUMBERS%></pre></td>
+ <td class="line-numbers" title="double click to toggle" ondblclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }"><pre><%LINE_NUMBERS%></pre></td>
<td class="code"><pre><%CONTENT%></pre></td>
</tr></table>
TABLE
@@ -136,7 +136,7 @@ module Encoders
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style type="text/css">
-.CodeRay .line_numbers a, .CodeRay .no a {
+.CodeRay .line-numbers a {
text-decoration: inherit;
color: inherit;
}
diff --git a/lib/coderay/encoders/terminal.rb b/lib/coderay/encoders/terminal.rb
index 860ea9c..15c8a52 100644
--- a/lib/coderay/encoders/terminal.rb
+++ b/lib/coderay/encoders/terminal.rb
@@ -22,7 +22,7 @@ module CodeRay
:annotation => '35',
:attribute_name => '33',
:attribute_value => '31',
- :bin => '1;35',
+ :binary => '1;35',
:char => {
:self => '36', :delimiter => '34'
},
@@ -47,11 +47,10 @@ module CodeRay
:hex => '1;36',
:include => '33',
:integer => '1;34',
- :interpreted => '1;35',
:key => '35',
:label => '1;15',
:local_variable => '33',
- :oct => '1;35',
+ :octal => '1;35',
:operator_name => '1;29',
:predefined_constant => '1;36',
:predefined_type => '1;30',
@@ -79,7 +78,6 @@ module CodeRay
},
:symbol => '1;32',
:tag => '34',
- :tag_special => ['34', '4'],
:type => '1;34',
:value => '36',
:variable => '34',