markdownz (markdownz v1.0.1)
View SourceExtensible Markdown parser with z_html_parse compatible output.
Summary
Functions
Parse in a monitored process with timeout and heap-size bounds. These bounds limit resource use; they do not sanitize raw HTML output.
Parse, render, and flatten in a resource-bounded monitored process.
Parse and render in a resource-bounded monitored process.
Types
-type config() :: #{options := map(), rulers := #{phase() := markdownz_ruler:ruler()}, renderers := #{binary() => fun((html_element(), config()) -> iodata())}}.
-type phase() :: block | inline | core.
Functions
-spec new() -> config().
-spec parse(iodata()) -> {ok, [html_element()]} | parse_error().
-spec parse(iodata(), config() | map()) -> {ok, [html_element()]} | parse_error().
-spec parse_bounded(iodata()) -> {ok, [html_element()]} | parse_error().
Parse in a monitored process with timeout and heap-size bounds. These bounds limit resource use; they do not sanitize raw HTML output.
-spec parse_bounded(iodata(), config() | map()) -> {ok, [html_element()]} | parse_error().
-spec replace_rule(config(), phase(), atom(), markdownz_ruler:handler()) -> config().
-spec to_binary_bounded(iodata()) -> {ok, binary()} | parse_error().
Parse, render, and flatten in a resource-bounded monitored process.
-spec to_binary_bounded(iodata(), config() | map()) -> {ok, binary()} | parse_error().
-spec to_html_bounded(iodata()) -> {ok, iodata()} | parse_error().
Parse and render in a resource-bounded monitored process.
-spec to_html_bounded(iodata(), config() | map()) -> {ok, iodata()} | parse_error().