2007-08-16 00:20:18 +04:00
|
|
|
module CodeRay
|
|
|
|
module Scanners
|
|
|
|
|
|
|
|
class Plaintext < Scanner
|
|
|
|
|
|
|
|
register_for :plaintext, :plain
|
2009-11-07 12:08:13 +03:00
|
|
|
title 'Plain text'
|
2007-08-16 00:20:18 +04:00
|
|
|
|
|
|
|
include Streamable
|
2009-11-07 12:08:13 +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
|