Skip to content

Commit

Permalink
Prevent inclusion of whitespace character after macro_rules ident
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Feb 27, 2024
1 parent 53ed660 commit 5df9593
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/librustdoc/html/highlight.rs
Expand Up @@ -136,6 +136,7 @@ fn can_merge(class1: Option<Class>, class2: Option<Class>, text: &str) -> bool {
match (class1, class2) {
(Some(c1), Some(c2)) => c1.is_equal_to(c2),
(Some(Class::Ident(_)), None) | (None, Some(Class::Ident(_))) => true,
(Some(Class::Macro(_)), _) => false,
(Some(_), None) | (None, Some(_)) => text.trim().is_empty(),
(None, None) => true,
}
Expand Down

0 comments on commit 5df9593

Please sign in to comment.