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

Bug with multiple nested lists #711

Open
boardfish opened this issue Jun 30, 2021 · 1 comment
Open

Bug with multiple nested lists #711

boardfish opened this issue Jun 30, 2021 · 1 comment

Comments

@boardfish
Copy link

Input:

1.  **Ordered List Item 1**

    **More Context**
    - **Something fun**: Test
    - **Something else:** Test

    **Another List**
    - Item 1
    - Item 2
    - Item 3
    - Item 4

Given output:

<ol>
  <li>
    <p><strong>Ordered List Item 1</strong></p>

    <p><strong>More Context</strong></p>

    <ul>
      <li><strong>Something fun</strong>: Test</li>
      <li><strong>Something else:</strong> Test</li>
    </ul>

    <p><strong>Another List</strong>
      - Item 1
      - Item 2
      - Item 3
      - Item 4</p>
  </li>
</ol>

Desired output:

<ol>
  <li>
    <p><strong>Ordered List Item 1</strong></p>

    <p><strong>More Context</strong></p>

    <ul>
      <li><strong>Something fun</strong>: Test</li>
      <li><strong>Something else:</strong> Test</li>
    </ul>

    <p><strong>Another List</strong></p>
    <ul>
      <li>Item 1</li>
      <li>Item 2</li>
      <li>Item 3</li>
      <li>Item 4</li>
    </ul>
  </li>
</ol>

I couldn't find a way to coerce my Markdown to something that wouldn't either a) break out of the li element or b) result in code-style formatting because I've indented to 4.

@cyfung1031
Copy link

cyfung1031 commented Jun 3, 2023

Recently I found the similar issue as #736

Marked.js can produce the correct HTML output while redcarpet cannot.
Correct Result

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