QDoc: Clean up whitespace noise in template output
Template control flow produces extra blank lines in rendered output,
causing documentation pages to accumulate whitespace between elements.
This makes both HTML and Markdown output look unpolished.
The template engine now strips whitespace artifacts from control flow
automatically. Intentional blank lines in templates are preserved.
The Markdown page template is adjusted so that horizontal rules aren't
misinterpreted as headings.
Task-number: QTBUG-144245
Change-Id: Ic7545ffe98a0c1e7ef545b65719a60efad7630b3
Reviewed-by: Topi Reinio <topi.reinio@qt.io>
Reviewed-by: David Boddie <david.boddie@qt.io>
| commit | 891a2b3d10ecac5f7ef9f3b9abcd6454528d94be |
| parent | af3c47ca1487c8580280a8648f5656075fd56454 |
| author | Paul Wicking <paul.wicking@qt.io> |
| committer | Paul Wicking <paul.wicking@qt.io> |
| commit time | Mon, 23 Feb 2026 19:41:09 +0100 |
- M src/qdoc/qdoc/src/qdoc/injabridge.cpp
- M src/qdoc/qdoc/src/qdoc/ir/contentbuilder.cpp
- M src/qdoc/qdoc/src/qdoc/templates/page.md
- M src/qdoc/qdoc/src/qdoc/templates/partials/html/content_blocks.html
- 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
- A src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/html_escaping/expected/html-escaping-test.index
- A src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/html_escaping/expected/template/html-escaping.html
- A src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/html_escaping/html_escaping.qdocconf
- A src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/html_escaping/src/htmlescaping.qdoc
- 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