Update src/librustdoc/passes/html_tags.rs

Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
This commit is contained in:
Michael Howell 2022-07-30 09:02:05 -07:00 committed by GitHub
parent f5cd6b3e9b
commit ad197e414c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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(