Migration Guide

Xavier Mendez edited this page Feb 20, 2014 · 7 revisions

Hoedown's API has been greatly improved from Sundown's.

Every function in Hoedown has been namespaced -- prefixed with hoedown_ and the module name, e.g.,

Sundown Hoedown
struct buf hoedown_buffer
bufgrow hoedown_buffer_grow
sd_markdown_render hoedown_document_render
sdhtml_renderer hoedown_html_renderer

This includes enums, all enums are now namespaced, e.g.,

Sundown Hoedown
MKDA_NOT_AUTOLINK HOEDOWN_AUTOLINK_NONE
MKDEXT_FENCED_CODE HOEDOWN_EXT_FENCED_CODE

The API also underwent changes to improve consistency, e.g.,

Sundown Hoedown
bufnew hoedown_buffer_new
bufrelease hoedown_buffer_free
stack_init hoedown_stack_new
stack_free hoedown_stack_free
sd_markdown_new hoedown_document_new
sd_markdown_free hoedown_document_free
sd_autolink_issafe hoedown_autolink_is_safe
sdhtml_is_tag hoedown_html_is_tag

Also, all the instance functions accept the instance as the first parameter.
See Getting Started for an example.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.