diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-11-12 19:28:59 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-11-12 19:28:59 -0800 |
commit | 34840a77d3cb48d2d7490b7cce95d7cdd66cc510 (patch) | |
tree | d4af2d77c369a50dd16a9fad9e8398321fe37392 | |
parent | 5a7a3e829a9a62f51bbd49e1ef4256a64d1f2493 (diff) |
wrapper.rb: properly calculate length of string in bytes.
-rw-r--r-- | wrapper.rb | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -7,7 +7,8 @@ module CMark end def markdown_to_html(s) - CMark::cmark_markdown_to_html(s, s.length) + len = s.bytes.length + CMark::cmark_markdown_to_html(s, len) end print markdown_to_html(STDIN.read()); |