summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]wrapper.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/wrapper.rb b/wrapper.rb
index e7e515c..59a9b87 100644..100755
--- a/wrapper.rb
+++ b/wrapper.rb
@@ -1,3 +1,4 @@
+#!/usr/bin/env ruby
require 'ffi'
module CMark
@@ -7,9 +8,8 @@ module CMark
end
def markdown_to_html(s)
- len = s.bytes.length
+ len = s.bytesize
CMark::cmark_markdown_to_html(s, len)
end
-print markdown_to_html(STDIN.read());
-
+STDOUT.write(markdown_to_html(ARGF.read()))