summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners/plaintext.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/coderay/scanners/plaintext.rb')
-rw-r--r--lib/coderay/scanners/plaintext.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/coderay/scanners/plaintext.rb b/lib/coderay/scanners/plaintext.rb
index f00aabb..b8db721 100644
--- a/lib/coderay/scanners/plaintext.rb
+++ b/lib/coderay/scanners/plaintext.rb
@@ -1,6 +1,11 @@
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
@@ -8,7 +13,9 @@ module Scanners
include Streamable
- KINDS_NOT_LOC = [:plain]
+ KINDS_NOT_LOC = [:plain] # :nodoc:
+
+ protected
def scan_tokens tokens, options
tokens << [string, :plain]