simple reference link . [text *emphasis*](a){#id .a} .
. simple definition link . [a][]{#id .b} [a]: /url . . simple image . ![a](b){#id .a b=c} . . simple inline code . `a`{#id .a b=c} .a
{#id key="*"}
. ignore if text . ![a](b)b{#id key="*"} .b{#id key="*"}
. multi-line . ![a](b){ #id .a b=c } more .more
. merging attributes . ![a](b){#a .a}{.b class=x other=h}{#x class="x g" other=a} . . spans: simple . [a]{#id .b}c .ac
. spans: end of inline before attrs . [a] .[a]
. spans: space between brace and attrs . [a] {.b} .[a] {.b}
. spans: escaped span start . \[a]{.b} .[a]{.b}
. spans: escaped span end . [a\]{.b} .[a]{.b}
. spans: escaped span attribute . [a]\{.b} .[a]{.b}
. spans: nested text syntax . [*a*]{.b}c .ac
. spans: nested span . *[a]{.b}c* .ac
. spans: multi-line . x [a b]{#id b=c} y .x a b y
. spans: nested spans . [[a]{.b}]{.c} .a
. spans: short link takes precedence over span . [a]{#id .b} [a]: /url . . spans: long link takes precedence over span . [a][a]{#id .b} [a]: /url . . spans: link inside span . [[a]]{#id .b} [a]: /url . . spans: merge attributes . [a]{#a .a}{#b .a .b other=c}{other=d} .a
.