summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners
diff options
context:
space:
mode:
Diffstat (limited to 'lib/coderay/scanners')
-rw-r--r--lib/coderay/scanners/_map.rb5
-rw-r--r--lib/coderay/scanners/plaintext.rb26
-rw-r--r--lib/coderay/scanners/text.rb26
3 files changed, 29 insertions, 28 deletions
diff --git a/lib/coderay/scanners/_map.rb b/lib/coderay/scanners/_map.rb
index 517e388..d1b1a29 100644
--- a/lib/coderay/scanners/_map.rb
+++ b/lib/coderay/scanners/_map.rb
@@ -12,11 +12,12 @@ module Scanners
:nitro => :nitro_xhtml,
:pascal => :delphi,
:patch => :diff,
- :plain => :plaintext,
+ :plain => :text,
+ :plaintext => :text,
:xhtml => :html,
:yml => :yaml
- default :plain
+ default :text
end
end
diff --git a/lib/coderay/scanners/plaintext.rb b/lib/coderay/scanners/plaintext.rb
deleted file mode 100644
index b8ea5f5..0000000
--- a/lib/coderay/scanners/plaintext.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-module CodeRay
-module Scanners
-
- # Scanner for plain text.
- #
- # Yields just one token of the kind :plain.
- #
- # Alias: +plain+
- class Plaintext < Scanner
-
- register_for :plaintext, :plain
- title 'Plain text'
-
- KINDS_NOT_LOC = [:plain] # :nodoc:
-
- protected
-
- def scan_tokens encoder, options
- encoder.text_token string, :plain
- encoder
- end
-
- end
-
-end
-end
diff --git a/lib/coderay/scanners/text.rb b/lib/coderay/scanners/text.rb
new file mode 100644
index 0000000..bde9029
--- /dev/null
+++ b/lib/coderay/scanners/text.rb
@@ -0,0 +1,26 @@
+module CodeRay
+ module Scanners
+
+ # Scanner for plain text.
+ #
+ # Yields just one token of the kind :plain.
+ #
+ # Alias: +plaintext+, +plain+
+ class Text < Scanner
+
+ register_for :text
+ title 'Plain text'
+
+ KINDS_NOT_LOC = [:plain] # :nodoc:
+
+ protected
+
+ def scan_tokens encoder, options
+ encoder.text_token string, :plain
+ encoder
+ end
+
+ end
+
+ end
+end