Skip to content

Commit

Permalink
fix: ordered list start attribute name (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
nperez0111 authored Aug 12, 2024
2 parents 1d4be93 + 006da72 commit b1c5269
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Nodes/OrderedList.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ public function parseHTML()
public function addAttributes()
{
return [
'order' => [
'start' => [
'parseHTML' => fn ($DOMNode) => (int) $DOMNode->getAttribute('start') ?: null,
'renderHTML' => fn ($attributes) => ($attributes->order ?? null) ? ['start' => $attributes->order] : null,
'renderHTML' => fn ($attributes) => ($attributes->start ?? null) ? ['start' => $attributes->start] : null,
],
];
}
Expand Down
2 changes: 1 addition & 1 deletion tests/DOMParser/Nodes/OrderedListTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
[
'type' => 'orderedList',
'attrs' => [
'order' => 3,
'start' => 3,
],
'content' => [
[
Expand Down
2 changes: 1 addition & 1 deletion tests/DOMSerializer/Nodes/OrderedListTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
[
'type' => 'orderedList',
'attrs' => [
'order' => 3,
'start' => 3,
],
'content' => [
[
Expand Down

0 comments on commit b1c5269

Please sign in to comment.