From fa975bbf5d40644d987887b4cf273a3f02612f03 Mon Sep 17 00:00:00 2001 From: murphy Date: Sat, 1 May 2010 01:31:56 +0000 Subject: Direct Streaming! See #142 and Changes.textile. --- bin/coderay | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'bin/coderay') diff --git a/bin/coderay b/bin/coderay index e895c7e..7f8271d 100644 --- a/bin/coderay +++ b/bin/coderay @@ -72,15 +72,14 @@ Examples: end end - # TODO: allow streaming if tokens == :scan - output = CodeRay::Duo[lang => format].highlight input #, :stream => true + output = CodeRay::Duo[lang => format].highlight input, :stream => true else output = tokens.encode format end out = $stdout if output_filename - output_filename += '.' + CodeRay::Encoders[format]::FILE_EXTENSION + output_filename += '.' + CodeRay::Encoders[format]::FILE_EXTENSION.to_s if File.exist? output_filename err 'File %s already exists.' % output_filename exit -- cgit v1.2.1