Skip to content

DOCX Export: Nested bullet list get identical symbols #2226

@StephanMeijer

Description

@StephanMeijer

Very related to #2225 and #2227

Exported material

bn-nested-bullet list.docx

BlockNoteLibreOfficeGoogle Docs
Image Image Image

Incorrectness

As one can see, the icons in the export get identical list item symbols.

Why this is

word/document.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:document ...>
  <w:body>
    <w:p>
      <w:pPr>
        <w:pStyle w:val="ListParagraph"/>
        <w:numPr>
          <w:ilvl w:val="0"/>
          <w:numId w:val="2"/>
        </w:numPr>
      </w:pPr>
      <w:r>
        <w:t xml:space="preserve">Level one</w:t>
      </w:r>
    </w:p>
    <w:p>
      <w:pPr>
        <w:pStyle w:val="ListParagraph"/>
        <w:numPr>
          <w:ilvl w:val="1"/>
          <w:numId w:val="2"/>
        </w:numPr>
      </w:pPr>
      <w:r>
        <w:t xml:space="preserve">Level two</w:t>
      </w:r>
    </w:p>
    <w:p>
      <w:pPr>
        <w:pStyle w:val="ListParagraph"/>
        <w:numPr>
          <w:ilvl w:val="2"/>
          <w:numId w:val="2"/>
        </w:numPr>
      </w:pPr>
      <w:r>
        <w:t xml:space="preserve">Level three</w:t>
      </w:r>
    </w:p>
    <w:p>
      <w:pPr>
        <w:pStyle w:val="ListParagraph"/>
        <w:numPr>
          <w:ilvl w:val="3"/>
          <w:numId w:val="2"/>
        </w:numPr>
      </w:pPr>
      <w:r>
        <w:t xml:space="preserve">Level four</w:t>
      </w:r>
    </w:p>
  </w:body>
</w:document>

word/numbering.xml

All items are of list 2. When we open the numberings:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:numbering ...>
  <!-- ... -->
  <w:abstractNum w:abstractNumId="3" w15:restartNumberingAfterBreak="0">
    <w:multiLevelType w:val="hybridMultilevel"/>
    <w:lvl w:ilvl="0" w15:tentative="1">
      <w:start w:val="1"/>
      <w:numFmt w:val="bullet"/>
      <w:lvlText w:val=""/>
      <w:lvlJc w:val="left"/>
      <w:pPr>
        <w:ind w:left="360" w:hanging="360"/>
      </w:pPr>
    </w:lvl>
    <w:lvl w:ilvl="1" w15:tentative="1">
      <w:start w:val="1"/>
      <w:numFmt w:val="bullet"/>
      <w:lvlText w:val=""/>
      <w:lvlJc w:val="left"/>
      <w:pPr>
        <w:ind w:left="720" w:hanging="360"/>
      </w:pPr>
    </w:lvl>
    <w:lvl w:ilvl="2" w15:tentative="1">
      <w:start w:val="1"/>
      <w:numFmt w:val="bullet"/>
      <w:lvlText w:val=""/>
      <w:lvlJc w:val="left"/>
      <w:pPr>
        <w:ind w:left="1080" w:hanging="360"/>
      </w:pPr>
    </w:lvl>
    <w:lvl w:ilvl="3" w15:tentative="1">
      <w:start w:val="1"/>
      <w:numFmt w:val="bullet"/>
      <w:lvlText w:val=""/>
      <w:lvlJc w:val="left"/>
      <w:pPr>
        <w:ind w:left="1440" w:hanging="360"/>
      </w:pPr>
    </w:lvl>
    <w:lvl w:ilvl="4" w15:tentative="1">
      <w:start w:val="1"/>
      <w:numFmt w:val="bullet"/>
      <w:lvlText w:val=""/>
      <w:lvlJc w:val="left"/>
      <w:pPr>
        <w:ind w:left="1800" w:hanging="360"/>
      </w:pPr>
    </w:lvl>
    <w:lvl w:ilvl="5" w15:tentative="1">
      <w:start w:val="1"/>
      <w:numFmt w:val="bullet"/>
      <w:lvlText w:val=""/>
      <w:lvlJc w:val="left"/>
      <w:pPr>
        <w:ind w:left="2160" w:hanging="360"/>
      </w:pPr>
    </w:lvl>
    <w:lvl w:ilvl="6" w15:tentative="1">
      <w:start w:val="1"/>
      <w:numFmt w:val="bullet"/>
      <w:lvlText w:val=""/>
      <w:lvlJc w:val="left"/>
      <w:pPr>
        <w:ind w:left="2520" w:hanging="360"/>
      </w:pPr>
    </w:lvl>
    <w:lvl w:ilvl="7" w15:tentative="1">
      <w:start w:val="1"/>
      <w:numFmt w:val="bullet"/>
      <w:lvlText w:val=""/>
      <w:lvlJc w:val="left"/>
      <w:pPr>
        <w:ind w:left="2880" w:hanging="360"/>
      </w:pPr>
    </w:lvl>
    <w:lvl w:ilvl="8" w15:tentative="1">
      <w:start w:val="1"/>
      <w:numFmt w:val="bullet"/>
      <w:lvlText w:val=""/>
      <w:lvlJc w:val="left"/>
      <w:pPr>
        <w:ind w:left="3240" w:hanging="360"/>
      </w:pPr>
    </w:lvl>
  </w:abstractNum>
  <w:num w:numId="1">
    <w:abstractNumId w:val="1"/>
    <w:lvlOverride w:ilvl="0">
      <w:startOverride w:val="1"/>
    </w:lvlOverride>
  </w:num>
  <w:num w:numId="2">
    <w:abstractNumId w:val="3"/>
    <w:lvlOverride w:ilvl="0">
      <w:startOverride w:val="1"/>
    </w:lvlOverride>
  </w:num>
</w:numbering>

We can see that list with w:numId="2" inherits properties from the abstract numbering with w:abstractNumId="3". This abstract numbering prrescribes that all w:lvlText have value .

This is not strictly problematic on a semantic level but removes styling/information from the document during export/conversion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions