Skip to content

Commit ad197e4

Browse files
Update src/librustdoc/passes/html_tags.rs
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
1 parent f5cd6b3 commit ad197e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustdoc/passes/html_tags.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ fn is_valid_for_html_tag_name(c: char, is_empty: bool) -> bool {
9999
//
100100
// > A tag name consists of an ASCII letter followed by zero or more ASCII letters, digits, or
101101
// > hyphens (-).
102-
c.is_ascii_alphabetic() || (c.is_ascii_digit() && !is_empty) || (c == '-' && !is_empty)
102+
c.is_ascii_alphabetic() || !is_empty && (c == '-' || c.is_ascii_digit())
103103
}
104104

105105
fn extract_html_tag(

0 commit comments

Comments
 (0)