Skip to content

Commit

Permalink
refactor: detect ordered and unordered lists separately unless nested
Browse files Browse the repository at this point in the history
Fixes #444
  • Loading branch information
quantizor committed Feb 1, 2023
1 parent f57f151 commit 895c2b7
Show file tree
Hide file tree
Showing 2 changed files with 259 additions and 155 deletions.
43 changes: 43 additions & 0 deletions index.compiler.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2905,6 +2905,49 @@ print("hello world")
</div>
`)
})

it('#444 switching list formats regression test', () => {
render(
compiler(
`
1. One
2. Two
3. Three
* Red
* Green
* Blue
`
)
)

expect(root.innerHTML).toMatchInlineSnapshot(`
<div>
<ol start="1">
<li>
One
</li>
<li>
Two
</li>
<li>
Three
</li>
</ol>
<ul>
<li>
Red
</li>
<li>
Green
</li>
<li>
Blue
</li>
</ul>
</div>
`)
})
})

describe('horizontal rules', () => {
Expand Down

0 comments on commit 895c2b7

Please sign in to comment.