2007-08-16 00:20:18 +04:00
|
|
|
module CodeRay
|
|
|
|
module Scanners
|
|
|
|
|
|
|
|
class Plaintext < Scanner
|
|
|
|
|
|
|
|
register_for :plaintext, :plain
|
|
|
|
|
|
|
|
include Streamable
|
2009-11-20 18:50:06 +03:00
|
|
|
|
2007-08-16 00:20:18 +04:00
|
|
|
def scan_tokens tokens, options
|
|
|
|
text = (scan_until(/\z/) || '')
|
|
|
|
tokens << [text, :plain]
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|