diff options
author | murphy <murphy@rubychan.de> | 2011-05-21 03:03:31 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2011-05-21 03:03:31 +0000 |
commit | 5efcf487985e7348ed3d39f33b7185028a6e3716 (patch) | |
tree | ddaa71a4884a5349d985526f88f11a7514c7b6d7 /lib/coderay/scanners/text.rb | |
parent | c5a193f08ddef1ba1cb5e1f9b0789b2f587022c4 (diff) | |
download | coderay-5efcf487985e7348ed3d39f33b7185028a6e3716.tar.gz |
various fixes and cleanups in CodeRay's helpers
Diffstat (limited to 'lib/coderay/scanners/text.rb')
-rw-r--r-- | lib/coderay/scanners/text.rb | 26 |
1 files changed, 26 insertions, 0 deletions
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 |