From ad197e414c7dee64287b7f59b7ee3567a7f05927 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Sat, 30 Jul 2022 09:02:05 -0700 Subject: [PATCH] Update src/librustdoc/passes/html_tags.rs Co-authored-by: Guillaume Gomez --- src/librustdoc/passes/html_tags.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustdoc/passes/html_tags.rs b/src/librustdoc/passes/html_tags.rs index d65e076b818..f3a3c853cac 100644 --- a/src/librustdoc/passes/html_tags.rs +++ b/src/librustdoc/passes/html_tags.rs @@ -99,7 +99,7 @@ fn is_valid_for_html_tag_name(c: char, is_empty: bool) -> bool { // // > A tag name consists of an ASCII letter followed by zero or more ASCII letters, digits, or // > hyphens (-). - c.is_ascii_alphabetic() || (c.is_ascii_digit() && !is_empty) || (c == '-' && !is_empty) + c.is_ascii_alphabetic() || !is_empty && (c == '-' || c.is_ascii_digit()) } fn extract_html_tag(