2007-08-16 00:20:18 +04:00
|
|
|
module CodeRay
|
|
|
|
module Scanners
|
|
|
|
|
|
|
|
class Plaintext < Scanner
|
|
|
|
|
|
|
|
register_for :plaintext, :plain
|
2010-03-16 23:29:12 +03:00
|
|
|
title 'Plain text'
|
2007-08-16 00:20:18 +04:00
|
|
|
|
|
|
|
include Streamable
|
2010-03-16 23:29:12 +03:00
|
|
|
|
|
|
|
KINDS_NOT_LOC = [:plain]
|
|
|
|
|
2007-08-16 00:20:18 +04:00
|
|
|
def scan_tokens tokens, options
|
|
|
|
text = (scan_until(/\z/) || '')
|
|
|
|
tokens << [text, :plain]
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|