QDoc: Wire structured content into documentation templates
Documentation pages rendered by the template generator display body
content as flat, unformatted text. Paragraphs, code blocks, lists,
headings, and inline formatting are stripped, leaving readers with a
wall of unstyled text that loses the structural cues authors intended.
Templates now render documentation body as structured content with
full formatting. Paragraphs, code blocks with language highlighting,
lists, headings, notes, and inline formatting such as bold, italic,
links, and code spans render through HTML and Markdown partials.
Content too deeply nested for the template's explicit depth falls
back to plain text, preserving content at the cost of formatting.
Fixes: QTBUG-144245
Change-Id: I3ed95de0cb2f238ee15c0fde49c34022b7cb8e26
Reviewed-by: Topi Reinio <topi.reinio@qt.io>
| commit | 6765e7228babef8d60d05bd89d0b3c34be3b889a |
| parent | 073b49185370976676456a4001ad9b67f525e896 |
| author | Paul Wicking <paul.wicking@qt.io> |
| committer | Paul Wicking <paul.wicking@qt.io> |
| commit time | Mon, 23 Feb 2026 19:41:04 +0100 |
- M src/qdoc/qdoc/CMakeLists.txt
- M src/qdoc/qdoc/src/qdoc/injabridge.cpp
- M src/qdoc/qdoc/src/qdoc/injabridge.h
- M src/qdoc/qdoc/src/qdoc/ir/contentblock.cpp
- M src/qdoc/qdoc/src/qdoc/ir/contentblock.h
- M src/qdoc/qdoc/src/qdoc/ir/contentbuilder.cpp
- M src/qdoc/qdoc/src/qdoc/templategenerator.cpp
- M src/qdoc/qdoc/src/qdoc/templategenerator.h
- M src/qdoc/qdoc/src/qdoc/templates/page.html
- M src/qdoc/qdoc/src/qdoc/templates/page.md
- A src/qdoc/qdoc/src/qdoc/templates/partials/html/content_blocks.html
- A src/qdoc/qdoc/src/qdoc/templates/partials/md/content_blocks.md
- M src/qdoc/qdoc/tests/qdoc/injabridge/catch_injabridge.cpp
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/dual_format_output/expected/html/readme.html
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/dual_format_output/expected/markdown/readme.md
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/markdown_output/expected/template/readme.md
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/minimal_configuration_template/expected/template/readme.html