Skip to content

Commit 9dbb09a

Browse files
authored
Merge pull request #1335 from drgrice1/pgml-fix-invalid-html
Replace invalid "type" attribute on `ul` tag in PGML.
2 parents d95fbe5 + 1b50338 commit 9dbb09a

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

macros/core/PGML.pl

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1550,28 +1550,27 @@ sub Align {
15501550
}
15511551

15521552
our %bullet = (
1553-
bullet => 'ul type="disc"',
1554-
numeric => 'ol type="1"',
1555-
alpha => 'ol type="a"',
1556-
Alpha => 'ol type="A"',
1557-
roman => 'ol type="i"',
1558-
Roman => 'ol type="I"',
1559-
disc => 'ul type="disc"',
1560-
circle => 'ul type="circle"',
1561-
square => 'ul type="square"',
1553+
bullet => [ 'ul', 'list-style-type: disc;' ],
1554+
numeric => [ 'ol', 'list-style-type: decimal;' ],
1555+
alpha => [ 'ol', 'list-style-type: lower-alpha;' ],
1556+
Alpha => [ 'ol', 'list-style-type: upper-alpha;' ],
1557+
roman => [ 'ol', 'list-style-type: lower-roman;' ],
1558+
Roman => [ 'ol', 'list-style-type: upper-roman;' ],
1559+
disc => [ 'ul', 'list-style-type: disc;' ],
1560+
circle => [ 'ul', 'list-style-type: circle;' ],
1561+
square => [ 'ul', 'list-style-type: square;' ],
15621562
);
15631563

15641564
sub List {
15651565
my $self = shift;
15661566
my $item = shift;
15671567
my $list = $bullet{ $item->{bullet} };
1568-
return
1569-
$self->nl . '<'
1570-
. $list
1571-
. ' style="margin:0; padding-left:2.25em">' . "\n"
1572-
. $self->string($item)
1573-
. $self->nl . "</"
1574-
. substr($list, 0, 2) . ">\n";
1568+
return $self->nl
1569+
. main::tag(
1570+
$list->[0],
1571+
style => "margin:0; padding-left:2.25em; $list->[1]",
1572+
$self->string($item) . $self->nl
1573+
);
15751574
}
15761575

15771576
sub Bullet {

0 commit comments

Comments
 (0)