QDoc: Render lists and inline images in template table cells
The template generator renders a table cell as its flattened plain
text. A cell that holds a bulleted list collapses to running text, and
a cell whose content is an inline image renders empty, since an image
carries no text of its own. Links and inline code inside cells are
flattened the same way. Readers of the generated documentation lose
the structure the author wrote in the cell.
The cell renderer now walks the cell's own inline content and its
child blocks rather than printing flat text: lists render as lists,
inline images as images, and links and code keep their markup. The
intermediate representation already carried this structure; only the
templates ignored it. The unroll is bounded to the shapes that occur
in cells and mirrors the engine's existing pattern, since Inja offers
no recursion. A new fixture exercises image-only cells and lists with
embedded images across both template formats.
Task-number: QTBUG-147379
Pick-to: 6.12
Change-Id: I411c3dc5a58956567b8d55a09220b87c915edadd
Reviewed-by: Topi Reinio <topi.reinio@qt.io>
| commit | de1d6f8c10c4657c49f9ed78587e735071b50347 |
| parent | 86baeee3d88f52eb821eb7be92382a2b9262a038 |
| author | Paul Wicking <paul.wicking@qt.io> |
| committer | Paul Wicking <paul.wicking@qt.io> |
| commit time | Thu, 11 Jun 2026 04:53:51 +0000 |
- M src/qdoc/qdoc/src/qdoc/templates/partials/html/content_blocks.html
- M src/qdoc/qdoc/src/qdoc/templates/partials/md/content_blocks.md
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/qtlottie_validation/expected/html/lottietoqml.html
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/qtlottie_validation/expected/markdown/lottietoqml.md
- A src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/table_cell_content/expected/html/images/test-image.png
- A src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/table_cell_content/expected/html/table-cell-content.html
- A src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/table_cell_content/expected/markdown/images/test-image.png
- A src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/table_cell_content/expected/markdown/table-cell-content.md
- A src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/table_cell_content/expected/tablecellcontent.index
- A src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/table_cell_content/src/images/test-image.png
- A src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/table_cell_content/src/table_cell_content.qdoc
- A src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/table_cell_content/table_cell_content.qdocconf