diff options
Diffstat (limited to 'vendor/gems/coderay-0.9.7/lib/coderay/scanners/plaintext.rb')
-rw-r--r-- | vendor/gems/coderay-0.9.7/lib/coderay/scanners/plaintext.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/vendor/gems/coderay-0.9.7/lib/coderay/scanners/plaintext.rb b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/plaintext.rb new file mode 100644 index 000000000..6cbb1196c --- /dev/null +++ b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/plaintext.rb @@ -0,0 +1,21 @@ +module CodeRay +module Scanners + + class Plaintext < Scanner + + register_for :plaintext, :plain + title 'Plain text' + + include Streamable + + KINDS_NOT_LOC = [:plain] + + def scan_tokens tokens, options + text = (scan_until(/\z/) || '') + tokens << [text, :plain] + end + + end + +end +end |