diff options
author | murphy <murphy@rubychan.de> | 2006-07-11 13:37:29 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2006-07-11 13:37:29 +0000 |
commit | af567b33a564774f49be966fc192618a89905b0c (patch) | |
tree | 2d45caeb4e31d4b671367fb68fc5b1c7c4fad640 /lib/coderay/scanners | |
parent | 72733d78f50c175380c776abebf315745d0a6268 (diff) | |
download | coderay-af567b33a564774f49be966fc192618a89905b0c.tar.gz |
Fixed Plaintext scanner (crashed on empty text - ouch!!)
Added coderay_stylesheet executable (should be "coderay stylesheet css" or just "coderay sty" some day.)
Diffstat (limited to 'lib/coderay/scanners')
-rw-r--r-- | lib/coderay/scanners/plaintext.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/coderay/scanners/plaintext.rb b/lib/coderay/scanners/plaintext.rb index 432745f..1cd7a8a 100644 --- a/lib/coderay/scanners/plaintext.rb +++ b/lib/coderay/scanners/plaintext.rb @@ -6,7 +6,8 @@ module Scanners register_for :plaintext, :plain def scan_tokens tokens, options - tokens << [scan_until(/\z/), :plain] + text = (scan_until(/\z/) || '') + tokens << [text, :plain] end end |