docling-project / docling-project/docling

Markdown header levels are all the same

Open
#652 2 comments 14 reactions 0 assignees View on GitHub
bug pdf
Dominant language
Python
Stars
66.4k
Forks
4.8k
Avg merge
2d 21h
Merged PRs (30d)
84

Description

### Bug

image
This is probably not a real bug but a feature request:

All headers in the generated markdown files are at the same level, i.e. ## .

For example, in the sample PDF to markdown conversion, section 3 has multiple sub-sections:

## 3 Processing pipeline
....
## 3.1 PDF backends
...
## 3.2 AI models

The correct header levels really should be something like this:

## 3 Processing pipeline
....
### 3.1 PDF backends
...
### 3.2 AI models
...

It would be great if the header level can be fixed, because this can keep the hierarchical structure of the original article.

### Steps to reproduce

Just run the sample code of this repo.
...

### Docling version

...

### Python version

...

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.