Skip to content

List functionality generates invalid HTML #483

@leonardschoyen-at-dfo

Description

@leonardschoyen-at-dfo

Steps to reproduce

  1. Start unordered list.
  2. Write "a", "b", and "c" on three items in the unordered list.
  3. Put the cursor on the second line, behind the "b" text.
  4. Increase the list level of the second line.
  5. Inspect the generated HTML

Current behavior

The HTML that is generated currently look like this:

<ul class="UL">
    <li class="listItem">a</li>
    <ul class="UL">
        <li class="listItem">b</li>
    </ul>
    <li class="listItem">c</li>
</ul>

This HTML is invalid. There should only be <li> elements within <ul> and <ol>.

Expected behavior

The HTML that is generated should look like this:

<ul class="UL">
    <li class="listItem">
        a
        <ul class="UL">
            <li class="listItem">b</li>
        </ul>
    </li>
    <li class="listItem">c</li>
</ul>

The next level of the list, the inner <ul>, should be contained inside the <li> tag of the previous item, the one which contains "a".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions