docling-project / docling-project/docling
DocItemLabel.TITLE is being collapsed to SECTION_HEADER
- Dominant language
- Python
- Stars
- 66.4k
- Forks
- 4.8k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 84
Description
### Question
While reviewing some of the converted Markdown files, I noticed that page titles are consistently rendered as `##` headings instead of `#`.
Digging into the code, I found that `DocItemLabel.TITLE` is remapped to `SECTION_HEADER` in `layout_postprocessor.py`:
https://github.com/docling-project/docling/blob/5a141593be89c41ee0fcd9722e5d36f2eec29ada/docling/utils/layout_postprocessor.py#L192-L194
Is this the intended behavior? If so, is the remapping primarily meant to reduce false positives in title detection, or is there another reason behind this design decision?
Contributor guide
Research direction
Start in docling/utils/layout_postprocessor.py at the remapping around lines 192–194, then reproduce the converted Markdown output described in the issue. Trace how DocItemLabel.TITLE becomes SECTION_HEADER and confirm the intended heading level; done means the behavior matches the project’s decision or its rationale is clearly recorded.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100