summaryrefslogtreecommitdiff
path: root/lib/coderay
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2011-06-11 17:32:07 +0000
committermurphy <murphy@rubychan.de>2011-06-11 17:32:07 +0000
commit960881251ea1f30753cfa94574caa315f31c5874 (patch)
tree42b707d3aea06b836cdc2c5b1a5ed06e17b7a36e /lib/coderay
parentc499d778d87d233a22d0a3199594e36546841b62 (diff)
downloadcoderay-960881251ea1f30753cfa94574caa315f31c5874.tar.gz
cleanups
Diffstat (limited to 'lib/coderay')
-rw-r--r--lib/coderay/encoders/yaml.rb11
-rwxr-xr-xlib/coderay/token_kinds.rb6
2 files changed, 8 insertions, 9 deletions
diff --git a/lib/coderay/encoders/yaml.rb b/lib/coderay/encoders/yaml.rb
index 49cf86c..c12f8d0 100644
--- a/lib/coderay/encoders/yaml.rb
+++ b/lib/coderay/encoders/yaml.rb
@@ -1,15 +1,15 @@
module CodeRay
module Encoders
-
+
# = YAML Encoder
#
# Slow.
class YAML < Encoder
-
+
register_for :yaml
-
+
FILE_EXTENSION = 'yaml'
-
+
protected
def setup options
require 'yaml'
@@ -21,7 +21,6 @@ module Encoders
end
public
-
def text_token text, kind
@out << [text, kind]
end
@@ -43,6 +42,6 @@ module Encoders
end
end
-
+
end
end
diff --git a/lib/coderay/token_kinds.rb b/lib/coderay/token_kinds.rb
index 45507a1..d23262b 100755
--- a/lib/coderay/token_kinds.rb
+++ b/lib/coderay/token_kinds.rb
@@ -9,7 +9,7 @@ module CodeRay
# speedup
TokenKinds.compare_by_identity if TokenKinds.respond_to? :compare_by_identity
- TokenKinds.update with = { # :nodoc:
+ TokenKinds.update( # :nodoc:
:annotation => 'at',
:attribute_name => 'an',
:attribute_value => 'av',
@@ -80,8 +80,8 @@ module CodeRay
:operator => false, # 'op'
:space => false, # 'sp'
- :plain => false,
- }
+ :plain => false
+ )
TokenKinds[:method] = TokenKinds[:function]
TokenKinds[:escape] = TokenKinds[:delimiter]