docling-project / docling-project/docling
Docx - markdown adds extra space after bold characters - breaking the word
- Dominant language
- Python
- Stars
- 66.4k
- Forks
- 4.8k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 84
Description
### Bold Characters MD conversion Bug
Docling while converting docx files having words with bold characters adds extra space after the bold character in markdown therby breaking the word. I think this potentially will create issues when the output is used as chunks for LLMs. This issue was faced in real documents where many words often had Capitalized and bold first letters. Eg. **D**ocx, **P**arsing, **P**roject.
#### Example below to understand better:
**D**ocling (in Docx) is converted in md as: **D** ocling.
Tested using word_sample.docx:
Input:
Output : Markdown Preview:
### Steps to reproduce
1. Take any word document and add bold characters in the words and tables.
2. Use default docling convert to markdown method:
`
# Convert the document
converter = DocumentConverter()
result = converter.convert(docx_path)
markdown_content = result.document.export_to_markdown()
# then saving the markdown.
`
3. Comparing the markdown output with original docx input.
### Docling version
`docling --version
2025-12-08 12:52:25,009 - INFO - Loading plugin 'docling_defaults'
2025-12-08 12:52:25,019 - INFO - Registered ocr engines: ['auto', 'easyocr', 'ocrmac', 'rapidocr', 'tesserocr', 'tesseract']
Docling version: 2.64.0
Docling Core version: 2.54.0
Docling IBM Models version: 3.9.1
Docling Parse version: 4.7.2
Python: cpython-313 (3.13.7)
Platform: Windows-11-10.0.22631-SP0`
### Python version
`Python 3.13.7`
Contributor guide
Assessment
This issue has not been assessed yet.