aboutsummaryrefslogtreecommitdiff
path: root/lib/cmark/wrappers/wrapper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cmark/wrappers/wrapper.rb')
-rwxr-xr-xlib/cmark/wrappers/wrapper.rb15
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/cmark/wrappers/wrapper.rb b/lib/cmark/wrappers/wrapper.rb
deleted file mode 100755
index 2359366..0000000
--- a/lib/cmark/wrappers/wrapper.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/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()))