Skip to content

Parsing issue with nested lists in details block #1225

Closed
@paulnicolet

Description

@paulnicolet

Hi all 👋,

First, thanks for your work, it's awesome and very useful !

I think I spotted an issue when trying to add "complex" content in a details block, here is a description:

Without details block

I define the following structure:

Without details block
- Parent 1  
    Intro 1  

    - Child 1
    - Child 2
    - Child 3
    - Child 3

    Outro 1

which yields the following HTML:

<p>Without details block</p>
<ul>
    <li>
        <p>Parent 1<br />
            Intro 1 </p>
        <ul>
            <li>Child 1</li>
            <li>Child 2</li>
            <li>Child 3</li>
            <li>Child 3</li>
        </ul>
        <p>Outro 1</p>
    </li>
</ul>

which gives this in the browser:

image

With details block

Now, when I try to add a details block around in order to make it collapsible:

???+ "With details block"
    - Parent 1  
        Intro 1  

        - Child 1
        - Child 2
        - Child 3
        - Child 3

        Outro 1

yielding this HTML:

<details open="open">
    <summary>With details block</summary>
    <ul>
        <li>
            <p>Parent 1<br />
                Intro 1 </p>
            <ul>
                <li>Child 1<ul>
                        <li>Child 2</li>
                        <li>Child 3</li>
                        <li>Child 3</li>
                    </ul>
                </li>
            </ul>
            <p>Outro 1</p>
        </li>
    </ul>
</details>

(you can already spot the issue here around Child 1), this gives:

image

The HTML is badly formatted in the children 2, 3, 4 got one extra level of indentation.


I tried a lot of whitespace / linebreaks / indentation combination attempting to solve the issue but I could not make it.

Is there any chance that this comes from the extension itself ?

Thanks a lot guys 😊

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions