summaryrefslogtreecommitdiff
path: root/bin/coderay
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2010-05-01 01:31:56 +0000
committermurphy <murphy@rubychan.de>2010-05-01 01:31:56 +0000
commitfa975bbf5d40644d987887b4cf273a3f02612f03 (patch)
tree5ffada8100c1b6cb9057dec7985daaf6d1851396 /bin/coderay
parente271dc13633fa6dba9fb87f415d72505af0cc88c (diff)
downloadcoderay-fa975bbf5d40644d987887b4cf273a3f02612f03.tar.gz
Direct Streaming! See #142 and Changes.textile.
Diffstat (limited to 'bin/coderay')
-rw-r--r--bin/coderay5
1 files changed, 2 insertions, 3 deletions
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