summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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]