[clang-tools-extra] [clang-doc] remove indentation for preformatted text (PR #166672)
Erick Velez via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 6 08:42:07 PST 2025
evelez7 wrote:
> I guess that makes me wonder if we want a `\<pre\><pre/>` tag surrounding those, since they aren't really using any kind of special formatting for alignment or font.
We need `<pre>` tags surrounding `code` blocks for highlight.js.
https://github.com/highlightjs/highlight.js?tab=readme-ov-file#in-the-browser
If want it done a different way, without needing the `<pre>` tags, we can explore that.
https://github.com/highlightjs/highlight.js?tab=readme-ov-file#using-custom-html
But I think the `pre` tags help to preserve line breaks and indentation in the code blocks themselves. So if someone uses a `@code` command in comments, the `<pre>` preserves their intended indentation and line breaks.
https://github.com/llvm/llvm-project/pull/166672
More information about the cfe-commits
mailing list