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