Sha256: 0322d06eb3a9c32004dcc6332bb7372b83499c002a27996f228ab56e1e5cc699
Contents?: true
Size: 316 Bytes
Versions: 54
Compression:
Stored size: 316 Bytes
Contents
#!/usr/bin/env ruby require 'ffi' module CMark extend FFI::Library ffi_lib ['libcmark', 'cmark'] attach_function :cmark_markdown_to_html, [:string, :int, :int], :string end def markdown_to_html(s) len = s.bytesize CMark::cmark_markdown_to_html(s, len, 0) end STDOUT.write(markdown_to_html(ARGF.read()))
Version data entries
54 entries across 54 versions & 1 rubygems