markdownz_block (markdownz v1.0.1)

View Source

Block-level Markdown parser.

Summary

Types

html_element/0

-type html_element() :: markdownz:html_element().

lines/0

-type lines() :: [binary()].

result/0

-type result() :: nomatch | {ok, [html_element()], lines(), state()}.

state/0

-type state() :: map().

Functions

default_rules()

-spec default_rules() -> markdownz_ruler:ruler().

parse(Source, Config)

-spec parse(binary(), markdownz:config()) -> {[html_element()], state()}.

parse_lines(Lines, State)

-spec parse_lines(lines(), state()) -> {[html_element()], state()}.

rule_blockquote(Lines, State)

-spec rule_blockquote(lines(), state()) -> result().

rule_fence(Rest, State)

-spec rule_fence(lines(), state()) -> result().

rule_heading(Lines, State)

-spec rule_heading(lines(), state()) -> result().

rule_hr(Rest, State)

-spec rule_hr(lines(), state()) -> result().

rule_html(Rest, State)

-spec rule_html(lines(), state()) -> result().

rule_indented_code(Rest, State)

-spec rule_indented_code(lines(), state()) -> result().

rule_list(Lines, State)

-spec rule_list(lines(), state()) -> result().

rule_paragraph(Rest, State)

-spec rule_paragraph(lines(), state()) -> result().

rule_table(Rest, State)

-spec rule_table(lines(), state()) -> result().