Mercurial > hg > soundsoftware-site
comparison vendor/gems/coderay-0.9.7/lib/coderay/scanners/plaintext.rb @ 523:0b6c82dead28 luisf
Merge from branch "cannam"
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Mon, 25 Jul 2011 14:23:37 +0100 |
parents | 0579821a129a |
children |
comparison
equal
deleted
inserted
replaced
318:f7c525dc7585 | 523:0b6c82dead28 |
---|---|
1 module CodeRay | |
2 module Scanners | |
3 | |
4 class Plaintext < Scanner | |
5 | |
6 register_for :plaintext, :plain | |
7 title 'Plain text' | |
8 | |
9 include Streamable | |
10 | |
11 KINDS_NOT_LOC = [:plain] | |
12 | |
13 def scan_tokens tokens, options | |
14 text = (scan_until(/\z/) || '') | |
15 tokens << [text, :plain] | |
16 end | |
17 | |
18 end | |
19 | |
20 end | |
21 end |