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

  class Plaintext < Scanner

    register_for :plaintext, :plain
    title 'Plain text'
    
    include Streamable
    
    KINDS_NOT_LOC = [:plain]
    
    def scan_tokens tokens, options
      text = (scan_until(/\z/) || '')
      tokens << [text, :plain]
    end

  end

end
end