Skip to content

Commit 760c3fa

Browse files
Fix case where doc_markdown is triggered on words ending with "ified"
1 parent 345c94c commit 760c3fa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clippy_lints/src/doc/markdown.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ fn check_word(cx: &LateContext<'_>, word: &str, span: Span, code_level: isize, b
9292
&& matches!(prefix.chars().last(), Some('S' | 'X'))
9393
{
9494
prefix
95+
} else if let Some(prefix) = s.strip_suffix("ified")
96+
&& prefix.chars().all(|c| c.is_ascii_uppercase())
97+
{
98+
prefix
9599
} else {
96100
s.strip_suffix('s').unwrap_or(s)
97101
};

0 commit comments

Comments
 (0)