- Commit
- f7613e98edbb8987e0e0ecfb3c789c7ee8d60017
- Parent
- 7191f6b7791b284c2d8d898e6e332a190367baa7
- Author
- John MacFarlane <jgm@berkeley.edu>
- Date
Added wrapper.rb.
My personal build of CMark ✏️
Added wrapper.rb.
1 file changed, 3 insertions, 3 deletions
Status | File Name | N° Changes | Insertions | Deletions |
Modified | wrapper.rb | 6 | 3 | 3 |
diff --git 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()))