microsoft / microsoft/markitdown

converting docx files to markdown with markitdown.exe does not escape special characters

Open
#2,157 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

markitdown version 0.1.6
OS: windows 11 x 64
using powershell terminal: markitdown file.docx -o file.md --keep-data-uris

If the line starts with hash mark ## it will keep it and recognized as section header.
If the line starts with pipeline character | it will be kept and recognized as table, even make it worse if it's already inside a table

only a few special characters listed here will be escaped, like asterisk, underscore.

also, when it converts the table in docx files, the markdown generated will get an empty header and put the real header as the first content row.

the converted result is something like:

| | | |
| --- | --- | --- |
| Header 1 | Header 2 | Header 3 |

but it should be like:

| Header 1 | Header 2 | Header 3 |
| --- | --- | --- |

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

Reproduce the reported Windows command with a DOCX containing lines beginning with ## and |, plus a table, and inspect the generated Markdown. Verify that special characters are escaped and that the first table row is used as the header; done means the output matches the examples in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
content
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.