diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2022-09-12 22:47:18 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-12 22:47:18 +0200 |
| commit | 031a2f85a52e850758447c7aec879622aff87d33 (patch) | |
| tree | 267c0cd3133b9b5258d62c025faf1e27bb6cec4a /src/librustdoc | |
| parent | ac92cc861c5273a5c5fb17d8415dcf5babc5c173 (diff) | |
| parent | 29f789ffdc3da0cd1d0b0be67284265f6a5ab818 (diff) | |
Rollup merge of #101735 - notriddle:notriddle/backslash-escaped-html, r=GuillaumeGomez
rustdoc: fix treatment of backslash-escaped HTML
Try generating HTML for this markup:
\<a href="https://example.com">example</a>
It will produce text, not HTML, in both rustdoc's real HTML output and in the commonmark reference implementation:
https://spec.commonmark.org/dingus/?text=%5C%3Ca%20href%3D%22https%3A%2F%2Fexample.com%22%3Eexample%3C%2Fa%3E
Diffstat (limited to 'src/librustdoc')
| -rw-r--r-- | src/librustdoc/passes/html_tags.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/passes/html_tags.rs b/src/librustdoc/passes/html_tags.rs index 1bce24b0ad3..885dadb32a8 100644 --- a/src/librustdoc/passes/html_tags.rs +++ b/src/librustdoc/passes/html_tags.rs @@ -355,7 +355,7 @@ impl<'a, 'tcx> DocVisitor for InvalidHtmlTagsLinter<'a, 'tcx> { for (event, range) in p { match event { Event::Start(Tag::CodeBlock(_)) => in_code_block = true, - Event::Html(text) | Event::Text(text) if !in_code_block => { + Event::Html(text) if !in_code_block => { extract_tags(&mut tags, &text, range, &mut is_in_comment, &report_diag) } Event::End(Tag::CodeBlock(_)) => in_code_block = false, |
