X Tutup
The Wayback Machine - https://web.archive.org/web/20210116213056/https://github.com/Python-Markdown/markdown/issues/845
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

Nested block level items break list without blank line after #845

Open
kutetapolu opened this issue Jul 12, 2019 · 3 comments
Open

Nested block level items break list without blank line after #845

kutetapolu opened this issue Jul 12, 2019 · 3 comments

Comments

@kutetapolu
Copy link

@kutetapolu kutetapolu commented Jul 12, 2019

Hi. I did submit this issue previously (#750), but github banned me for no reason whatsoever. I'm reposting it so it won't get lost.

Basically, this:

- item one

    second paragraph of item 1
- item two

Renders as:

<ul>
  <li>
    <p>item one</p>
    <p>second paragraph of item 1
- item two</p>
  </li>
</ul>

Here is the screenshot of previous discussion just in case:

750

@waylan
Copy link
Member

@waylan waylan commented Jul 12, 2019

Thanks. As the old issue was deleted, we had completely forgotten about it.

@JustAPerson
Copy link

@JustAPerson JustAPerson commented Dec 18, 2019

I think I found another case of the same bug.

- a
    hmm

- b
- c
<ul>
  <li>
  <p>a
      hmmm</p>
  </li>
  <li><p>b</p></li>
  <li>c</li>
</ul>

Notice how the line b now is incorrectly wrapped in a <p> tag.

@waylan
Copy link
Member

@waylan waylan commented Jun 30, 2020

@JustAPerson that is not related. In fact, that is correct behavior. Babelmark shows two common results, one which is defined in the Commonmark spec and one which follows the original rules. We are in the second group along with the reference implementation. Both agree that b should be wrapped in a <p> tag as the blank line before it forces it to be a loose list item. The difference between the two is that the third item reverts to a tight list in classic Markdown as it is not preceded by a blank line. In contrast, Commonmark applies the loose list to the entire list, not just the items which are adjacent to blank lines. In fact, the Commonmark spec acknowledges that this behavior diverges from classic Markdown.

@waylan waylan added the someday-maybe label Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.
X Tutup