Skip to content

Instantly share code, notes, and snippets.

@aciidgh
Created December 23, 2015 18:20
Show Gist options
  • Save aciidgh/6ea2e1bdc98089606ed0 to your computer and use it in GitHub Desktop.
Save aciidgh/6ea2e1bdc98089606ed0 to your computer and use it in GitHub Desktop.
let ib = hoedown_buffer_new(1024);
hoedown_buffer_puts(ib, "#file\n##dsdsd\n`hello`");
let renderer = hoedown_html_renderer_new(hoedown_html_flags(0), 0);
let ob = hoedown_buffer_new(1024);
let document = hoedown_document_new(renderer, hoedown_extensions(0), 16);
hoedown_document_render(document, ob, ib.memory.data, ib.memory.size);
let outputData = ob.memory.data
let outputSize = ob.memory.size
let str = String.fromCString(UnsafePointer<CChar>(outputData))!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment