diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-11-25 23:54:45 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-11-25 23:54:45 -0800 |
commit | f7613e98edbb8987e0e0ecfb3c789c7ee8d60017 (patch) | |
tree | 1ef7b72b7483126438d8b55f07a13426dac6f64c /wrapper.rb | |
parent | 7191f6b7791b284c2d8d898e6e332a190367baa7 (diff) |
Added wrapper.rb.
Diffstat (limited to 'wrapper.rb')
-rwxr-xr-x[-rw-r--r--] | wrapper.rb | 6 |
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())) |