Skip to content
This repository was archived by the owner on Nov 16, 2022. It is now read-only.

Commit ba9041c

Browse files
committed
fix name attribute unordered to bullet in list
1 parent d71ab1a commit ba9041c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Diff for: src/Parser/Html.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ protected function defaultAttributeOptions()
102102
'assign' => 'previous',
103103
'parent_tag' => 'ol'
104104
),
105-
'unordered' => array(
105+
'bullet' => array(
106106
'tag' => 'li',
107107
'type' => 'block',
108108
'assign' => 'previous',

Diff for: src/Parser/Parse.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ protected function isAttributeValid($attribute, $value)
118118
case 'list':
119119
if (array_key_exists('attributes', $this->options) === true &&
120120
array_key_exists($attribute, $this->options['attributes']) === true &&
121-
in_array($value, array('ordered', 'unordered')) === true) {
121+
in_array($value, array('ordered', 'bullet')) === true) {
122122

123123
$valid = true;
124124
}

Diff for: tests/ListTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ public function testSimpleOrderedList()
1717
$this->assertEquals($expected, $quill->render());
1818
}
1919

20-
public function testSimpleUnorderedList()
20+
public function testSimpleBulletList()
2121
{
22-
$delta = '{"ops":[{"insert":"Item 1"},{"attributes":{"list":"unordered"},"insert":"\n"},{"insert":"Item 2"},{"attributes":{"list":"unordered"},"insert":"\n"},{"insert":"Item 3"},{"attributes":{"list":"unordered"},"insert":"\n"}]}';
22+
$delta = '{"ops":[{"insert":"Item 1"},{"attributes":{"list":"bullet"},"insert":"\n"},{"insert":"Item 2"},{"attributes":{"list":"bullet"},"insert":"\n"},{"insert":"Item 3"},{"attributes":{"list":"bullet"},"insert":"\n"}]}';
2323
$expected = '<ul><li>Item 1</li><li>Item 2</li><li>Item 3</li></ul>';
2424

2525
$quill = new \DBlackborough\Quill\Render($delta);

0 commit comments

Comments
 (0)