From 36531238fa4ef33f1792c6ea6de5e00dcadf018a Mon Sep 17 00:00:00 2001 From: Kornelius Kalnbach Date: Fri, 19 Aug 2011 05:39:45 +0200 Subject: pretty (longer) token class names; closes #347 --- lib/coderay/encoders/html.rb | 1 - lib/coderay/encoders/html/numbering.rb | 2 +- lib/coderay/encoders/html/output.rb | 4 +- lib/coderay/encoders/terminal.rb | 6 +- lib/coderay/scanners/c.rb | 2 +- lib/coderay/scanners/cpp.rb | 2 +- lib/coderay/scanners/groovy.rb | 2 +- lib/coderay/scanners/java.rb | 2 +- lib/coderay/scanners/java_script.rb | 2 +- lib/coderay/scanners/python.rb | 4 +- lib/coderay/scanners/ruby.rb | 2 +- lib/coderay/scanners/sql.rb | 2 +- lib/coderay/scanners/yaml.rb | 4 +- lib/coderay/styles/alpha.rb | 183 +++++++++++++++------------------ lib/coderay/styles/cycnus.rb | 144 -------------------------- lib/coderay/styles/murphy.rb | 123 ---------------------- lib/coderay/token_kinds.rb | 132 ++++++++++++------------ 17 files changed, 166 insertions(+), 451 deletions(-) delete mode 100644 lib/coderay/styles/cycnus.rb delete mode 100644 lib/coderay/styles/murphy.rb (limited to 'lib/coderay') 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 # ) - # #-> 1 Some 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 - "#{indent}#{line_number_text}#{open}#{line}#{close}\n" + "#{indent}#{line_number_text}#{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 - +
<%LINE_NUMBERS%>
<%LINE_NUMBERS%>
<%CONTENT%>
TABLE @@ -136,7 +136,7 @@ module Encoders