From af567b33a564774f49be966fc192618a89905b0c Mon Sep 17 00:00:00 2001 From: murphy Date: Tue, 11 Jul 2006 13:37:29 +0000 Subject: Fixed Plaintext scanner (crashed on empty text - ouch!!) Added coderay_stylesheet executable (should be "coderay stylesheet css" or just "coderay sty" some day.) --- lib/coderay/scanners/plaintext.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/coderay/scanners/plaintext.rb') 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 -- cgit v1.2.1