Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix list parsing edge case #384

Merged
merged 1 commit into from Apr 4, 2024
Merged

Conversation

fans656
Copy link
Contributor

@fans656 fans656 commented Mar 30, 2024

Fix an incorrect list parsing (text merged) in situation like:

foo
- bar

table

which output:

<p>foo<br />
table</p>
<ul>
<li>bar</li>
</ul>

instead of:

<p>foo</p>
<ul>
<li>bar</li>
</ul>
<p>table</p>

The "table" is wrongly matched by BLOCK_HTML specification due to the use of _BLOCK_TAGS_PATTERN without parens.

All text begins with what's in BLOCK_TAGS will have this issue.

Fix an incorrect list parsing (text merged) in situation like:

```
foo
- bar

table
```

which output:

```
<p>foo<br />
table</p>
<ul>
<li>bar</li>
</ul>
```

instead of:

```
<p>foo</p>
<ul>
<li>bar</li>
</ul>
<p>table</p>
```

The "table" is wrongly matched by `BLOCK_HTML` specification due to
the use of `_BLOCK_TAGS_PATTERN` without parens.

All text begins with what's in `BLOCK_TAGS` will have this issue.
@lepture lepture merged commit a4037be into lepture:master Apr 4, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants