diff --git a/parser.leg b/parser.leg index 43e7623..1360801 100644 --- a/parser.leg +++ b/parser.leg @@ -508,7 +508,13 @@ StrongUl = TwoUlOpen { $$ = mk_list(STRONG, a) } Image = '!' ( ExplicitLink | ReferenceLink ) - { $$.key = IMAGE } + { if $$.key == LINK { + $$.key = IMAGE + } else { + result := $$ + $$.children = cons(mk_str("!"), result.children) + } + } Link = ExplicitLink | ReferenceLink | AutoLink