summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners/plaintext.rb
blob: a362f0b517145d0d699d0cbd009dd3d3f9367f65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module CodeRay
module Scanners

  class Plaintext < Scanner

    register_for :plaintext, :plain
    title 'Plain text'
    
    include Streamable

    def scan_tokens tokens, options
      text = (scan_until(/\z/) || '')
      tokens << [text, :plain]
    end

  end

end
end