From ff92cf54575e82a5c17578252d509fa6e02a3db9 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Wed, 23 Dec 2020 09:23:37 -0700 Subject: [PATCH] Markdown.pl: dd, dt and li do not autoclose containing table While
,
and
  • all have "optional" closing tags, they can all be contained within a table. And as such must not close the tags that define the content of the table itself. Customize the tagacl list for these three to exclude the tags that may contain table content to prevent their premature closing. Signed-off-by: Kyle J. McKay --- Markdown.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Markdown.pl b/Markdown.pl index 0fd029c..d14c1c3 100755 --- a/Markdown.pl +++ b/Markdown.pl @@ -2996,9 +2996,9 @@ BEGIN { %tagocl = map({$_ => 1} qw(colgroup dd dt li p tbody td tfoot th thead tr)); %tagacl = ( 'colgroup' => \%tagocl, - 'dd' => \%tagocl, - 'dt' => \%tagocl, - 'li' => \%tagocl, + 'dd' => { map({$_ => 1} qw(colgroup dd dt li p)) }, + 'dt' => { map({$_ => 1} qw(colgroup dd dt li p)) }, + 'li' => { map({$_ => 1} qw(colgroup dd dt li p)) }, 'tbody' => \%tagocl, 'td' => { map({$_ => 1} qw(colgroup dd dt li p td tfoot th thead)) }, 'tfoot' => \%tagocl,