diff options
| author | Michael Howell <michael@notriddle.com> | 2022-09-12 12:48:22 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2022-09-12 12:48:22 -0700 |
| commit | 29f789ffdc3da0cd1d0b0be67284265f6a5ab818 (patch) | |
| tree | f725ade3aab8c650d32083d7279eb578c7adbf51 /src/librustdoc | |
| parent | 98e1f041b6e33598a18edb928ec9db93a850c6cb (diff) | |
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 f3a3c853cac..5cea9def2d9 100644 --- a/src/librustdoc/passes/html_tags.rs +++ b/src/librustdoc/passes/html_tags.rs @@ -278,7 +278,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, |
