From b9766af7aa087b381ae8addc21cc4bc85117fe99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Teichgr=C3=A4ber?= Date: Mon, 21 Feb 2011 02:46:27 +0100 Subject: [PATCH] Fixed bug in ![nonexistent]. [jgm/peg-markdown] See https://github.com/jgm/peg-markdown/commit/cc1be41 --- parser.leg | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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