Skip to content

Convert DOCX to Markdown: Ordered List in Markdown keeps increasing across headings #10258

@ThachNgocTran

Description

@ThachNgocTran

Explain the problem

In Microsoft Word (DOCX), when starting a new heading (in this specific case: Heading 4), make an ordered list (or numbered list). Definitely, the starting number is reset expectedly. But when converting from DOCX to Markdown, using Pandoc, the numbered list keeps continuing, i.e. keep increasing across headings! This is unexpected.

Expectation: When a new heading starts, the ordered list should be reset (in Markdown). This is to keep it consistent with the DOCX version.

issue

Reproducibility

  • Input file: input.docx
  • Output file: output.md
  • Command line to convert Input to Output: pandoc --wrap=none --extract-media=./ -f docx -t gfm input.docx -o output.md
  • Pandoc Version: pandoc-3.4-windows-x86_64
  • OS: Windows 10 x64 (22H2)
  • Office Editor: LibreOffice 24.8.1.2

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions