Skip to content

Commit 248fdc9

Browse files
authored
Fix li elements
Closes GH-5. Reviewed-by: Titus Wormer <[email protected]>
1 parent 8aab322 commit 248fdc9

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lib/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ const blockOrCaption = convertElement([
106106
'hr', // Flow content
107107
'html', // Page
108108
'legend', // Flow content
109+
'li', // Lists (as `display: list-item`)
109110
'listing', // Flow content (legacy)
110111
'main', // Flow content
111112
'menu', // Lists

test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,13 @@ test('non-normal white-space', async function (t) {
358358
'\tDelta \n\techo\t\n'
359359
)
360360
})
361+
362+
await t.test('should support `li` elements', async function () {
363+
assert.equal(
364+
toText(h('ul', [h('li', 'Foxtrot'), h('li', 'Golf')])),
365+
'Foxtrot\nGolf'
366+
)
367+
})
361368
})
362369

363370
test('more whitespace', async function (t) {

0 commit comments

Comments
 (0)