microsoft / microsoft/markitdown

Nested tables in DOCX are lost when converting to Markdown

Open
#1,248 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
186k
Forks
13.7k
Avg merge
1d 4h
Merged PRs (30d)
49

Description

Description:
When converting a DOCX file containing nested tables to Markdown using markitdown, the inner table content is discarded in the output. This occurs consistently with specific document structures.

Steps to Reproduce:

  1. Environment:
    • Device: MacBook Pro with M3 chip

    • Installation:

    pip install -e 'packages/markitdown[all]'
    
  2. Test File:
    • [Attach a minimal DOCX file with nested tables (e.g., outer table → inner table → text)].

  3. Command:

    markitdown path-to-file.docx > document.md
    
  4. Observed Result:
    • Outer table structure is preserved, but inner table content is missing in document.md.

  5. Expected Result:
    • Both outer and inner tables should be rendered in Markdown (e.g., as nested HTML tables or flattened Markdown).

Image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the documented markitdown command with a DOCX containing an outer table, inner table, and text. Trace the DOCX-to-Markdown table conversion path; no source file or regression test is named in the issue. Done means inner-table content is preserved and a regression test covers the nested-table case.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
content
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.