summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners/text.rb
blob: bde9029785c1bdb12ff67bada8db6bc8769556cf (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
module CodeRay
  module Scanners
    
    # Scanner for plain text.
    # 
    # Yields just one token of the kind :plain.
    # 
    # Alias: +plaintext+, +plain+
    class Text < Scanner
      
      register_for :text
      title 'Plain text'
      
      KINDS_NOT_LOC = [:plain]  # :nodoc:
      
    protected
      
      def scan_tokens encoder, options
        encoder.text_token string, :plain
        encoder
      end
      
    end
    
  end
end