Problem
Lists built purely from paragraph styles like List Bullet 2 / List Number 3 — with no numPr/ilvl numbering references — convert as flat, separate lists instead of nested ones. Real Word-authored lists carry numbering definitions and nest correctly; this only affects documents where the style alone implies the level. See the degraded.docx fixture ("Style-only lists" section) and decision log D12.
Proposed fix
Extend src/docx2md/preprocess.py (same technique as the monospace→code pre-pass):
- Detect paragraphs whose
pStyle matches List (Bullet|Number)( \d)?.
- Inject a multilevel
abstractNum/num definition into word/numbering.xml (the fixture generator in scripts/make_fixtures.py already builds exactly this XML).
- Stamp
numPr with numId + ilvl derived from the style suffix onto those paragraphs, one numId per contiguous list group.
Pandoc then nests correctly — verified during the feasibility spike.
Acceptance
- New fixture with style-only nested bullet + ordered lists converts with correct nesting.
- Existing
lists.docx golden output unchanged.
- Remove the corresponding entry from README known limitations.
Priority: highest of the known issues — it is the only one that loses document structure rather than styling.
Problem
Lists built purely from paragraph styles like
List Bullet 2/List Number 3— with nonumPr/ilvlnumbering references — convert as flat, separate lists instead of nested ones. Real Word-authored lists carry numbering definitions and nest correctly; this only affects documents where the style alone implies the level. See thedegraded.docxfixture ("Style-only lists" section) and decision log D12.Proposed fix
Extend
src/docx2md/preprocess.py(same technique as the monospace→code pre-pass):pStylematchesList (Bullet|Number)( \d)?.abstractNum/numdefinition intoword/numbering.xml(the fixture generator inscripts/make_fixtures.pyalready builds exactly this XML).numPrwithnumId+ilvlderived from the style suffix onto those paragraphs, onenumIdper contiguous list group.Pandoc then nests correctly — verified during the feasibility spike.
Acceptance
lists.docxgolden output unchanged.Priority: highest of the known issues — it is the only one that loses document structure rather than styling.