dead8309 / dead8309/markitdown-ts
DOCX tables with nested lists fail to convert to Markdown format
- Dominant language
- HTML
- Stars
- 142
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
When DOCX files contain tables with nested lists (`
- ` or `
- `) in table cells
2. Convert the DOCX file using `MarkItDown`
3. Check the conversion result## Actual Behavior
- **Table 1** (simple table): Correctly converts to Markdown table format
```markdown
| Column 1 | Column 2 |
| --- | --- |
| Text | More text |
```- **Table 2** (with lists): Remains as HTML format, not converted to Markdown
```html
...
```## Expected Behavior
All tables should be converted to Markdown table format, even when cells contain lists. List items can be converted to numbered text format (e.g., `1. Item 1`) to maintain Markdown table compatibility.
## Root Cause
The `@joplin/turndown-plugin-gfm` plugin cannot convert tables containing complex nested structures (such as lists) to valid Markdown tables, because Markdown table syntax does not support nested list structures within table cells.
- `) in table cells, the converted Markdown format is inconsistent. Simple tables convert correctly to Markdown tables, but tables containing lists are preserved as HTML format instead.
## Steps to Reproduce
1. Create a DOCX file containing two tables:
- Table 1: A simple table (only text and paragraphs)
- Table 2: A table with ordered lists (`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.