Add exception for "e.g."

This commit is contained in:
Malo 2025-07-16 03:03:17 +01:00
parent 2da2ffd799
commit ca87507b47

View File

@ -782,7 +782,7 @@ fn oneliner(docs: &str) -> EcoString {
'(' | '[' | '{' => depth += 1,
')' | ']' | '}' => depth -= 1,
'.' if depth == 0 => period = true,
c if period && c.is_whitespace() => {
c if period && c.is_whitespace() && !docs[..i].ends_with("e.g.") => {
end = i;
break;
}