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

  class Plaintext < Scanner

    register_for :plaintext, :plain

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

  end

end
end