Browse Source

Markdown.pl: dd, dt and li do not autoclose containing table

While <dd>, <dt> and <li> 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 <mackyle@gmail.com>
master
Kyle J. McKay 3 years ago
parent
commit
ff92cf5457
  1. 6
      Markdown.pl

6
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,

Loading…
Cancel
Save