docling-project / docling-project/docling-core

Exporting to markdown when table cell contains "|"

Open
#92 2 comments 0 reactions 0 assignees View on GitHub
duplicate
Dominant language
HTML
Stars
282
Forks
214
Avg merge
2d 15h
Merged PRs (30d)
21

Description

I'm using docling to load documents and then export_to_markdown. My data has many tables and I've discovered that some contain the "|" character, breaking the table structure. So I thought, docling should surely escape those when exporting. Or at least offer an option to do so (if not by default).

I see there is [another open issue](https://github.com/DS4SD/docling-core/issues/61) mentioning this.

I considered contributing, but am unsure of where a change like that could fit in. Perhaps adding a boolean escape_breaking parameter [here](https://github.com/DS4SD/docling-core/blob/180e294aada4d97ceeb61556b5f7f310bd078c5f/docling_core/types/legacy_doc/document.py#L441) and then replace any occurences of "|" with regex. Perhaps that is too crude. Any docling-core developer that could point me in the right direction?

Kind regards,

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.