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

List Block and HTML Block interaction issue: not handling Type-7 HTML at end properly #213

Closed
jackdewinter opened this issue Feb 6, 2021 · 1 comment

Comments

@jackdewinter
Copy link

Given the following Markdown:

- <script>
- some text
some other text
</script>

this implementation returns:

<ul>
<li>
<script>
</li>
<li>some text
some other text</li>
</ul>
</script>

Based on my reading of the script, documented here, the last three lines should be:

some other text
</script></li>
</ul>

As the </script> tag on line 4 is not a valid HTML Block start (type 7 cannot break paragraphs), it should be considered as normal text, only to be further realized as Raw HTML when processing the inline.

@jgm
Copy link
Member

jgm commented Feb 7, 2021

I think you're right about this case. commonmark.js and cmark both have this problem.

jgm added a commit to commonmark/cmark that referenced this issue Feb 7, 2021
@jgm jgm closed this as completed in 8f1a23f Feb 7, 2021
taku0 added a commit to taku0/cmark-el that referenced this issue Apr 3, 2021
They can't interrupt paragraphs (even with laziness).
commonmark/commonmark.js#213

commonmark/commonmark.js@8f1a23f
Author: John MacFarlane <jgm@berkeley.edu>
Date:   Sat Feb 6 23:03:27 2021 -0800
robinst added a commit to commonmark/commonmark-java that referenced this issue Jun 29, 2021
They were already special cased to not interrupt normal paragraphs. This
fixes handling of lazy paragraphs, see
commonmark/commonmark.js#213

Add updated regression files too.
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

No branches or pull requests

2 participants