summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners/plaintext.rb
blob: b8db72184bb47c7b17e436b653e8e73176fe98e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
module CodeRay
module Scanners
  
  # Scanner for plain text.
  # 
  # Yields just one token of the kind :plain.
  # 
  # Alias: +plain+
  class Plaintext < Scanner

    register_for :plaintext, :plain
    title 'Plain text'
    
    include Streamable
    
    KINDS_NOT_LOC = [:plain]  # :nodoc:
    
  protected
    
    def scan_tokens tokens, options
      tokens << [string, :plain]
    end

  end

end
end