diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2021-08-19 19:30:09 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-19 19:30:09 +0200 |
| commit | 10165f8af915ac4d57281694ea6a90041c76b5bd (patch) | |
| tree | e3b3fcf58b2f60f2293568fdc3196faf90f2d995 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs | |
| parent | 09d56a749c56b03f3b56b5d673328a58838cb5ca (diff) | |
| parent | ccd550ee565436b4c9b7f987c19bd3a9111714f1 (diff) | |
| download | rust-10165f8af915ac4d57281694ea6a90041c76b5bd.tar.gz rust-10165f8af915ac4d57281694ea6a90041c76b5bd.zip | |
Rollup merge of #88093 - Kobzol:rustdoc-wrap-code-in-code-tag, r=GuillaumeGomez
[rustdoc] Wrap code blocks in <code> tag This PR modifies Rustdoc output so that fenced code snippets, items and whole file source codes are wrapped in `<pre><code>` instead of just `<pre>`. This should improve the semantic meaning of the generated content. I'm not sure what to do about `render_attributes_in_pre` and `render_attributes_in_code`. These functions were clearly expected to be used for things inside `<pre>` or `<code>`, and since I added `<code>` in this PR, some of them will be used in a different context than before. However, it seems to me that even before they were not consistent. For example, `item_constant` used `render_attributes_in_code` for its attributes, however there was no `<code>` used for constants before this PR... Should I create some `rustdoc-gui` tests? For example to check that all `<pre>` tags have a `<code>` child? Fixes: https://github.com/rust-lang/rust/issues/88020
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs')
0 files changed, 0 insertions, 0 deletions
