#4389·docling

HTML backend drops a description list's content when its dt/dd groups are wrapped in div elements

Author: LindseyZ1205Created Sep 26, 2026Updated Sep 28, 2026
Labelsbughtml

Bug

The HTML spec allows each group of <dt>/<dd> elements in a <dl> to be wrapped in a <div>, and common design systems use this markup, e.g. the GOV.UK summary list and Tailwind UI description lists. The HTML backend only looks at the direct <dt>/<dd> children of a <dl>, so for this markup it creates an empty list group and all terms and descriptions are silently lost.

The cause is tag.find_all(["dt", "dd"], recursive=False) in the description list handling:

https://github.com/docling-project/docling/blob/2d5c590c/docling/backend/html_backend.py#L2799

Since <dl> is handled as a block, its <div> children are not walked anywhere else. I have a fix with a test and will open a PR.

Steps to reproduce

python
from io import BytesIO

from docling.datamodel.base_models import DocumentStream
from docling.document_converter import DocumentConverter

html = b"""<html><body><h1>Specs</h1>
<dl>
  <div><dt>Weight</dt><dd>1.2 kg</dd></div>
  <div><dt>Color</dt><dd>Black</dd></div>
</dl><p>After</p></body></html>"""
doc = DocumentConverter().convert(DocumentStream(name="t.html", stream=BytesIO(html))).document
print(doc.export_to_markdown())

Actual output:

# Specs

After

Expected, like the same list without the <div> wrappers:

# Specs

- **Weight**
    - 1.2 kg
- **Color**
    - Black

After

Docling version

2.130.0 (main @ 2d5c590c)

Python version

Python 3.12.13