mirror of
https://github.com/Automattic/harper.git
synced 2025-12-05 19:26:55 -06:00
feat: per say / per-se → per se (#2258)
This commit is contained in:
@@ -866,6 +866,13 @@ pub fn lint_group() -> LintGroup {
|
||||
"Corrects `piece of mind` to `peace of mind`.",
|
||||
LintKind::Eggcorn
|
||||
),
|
||||
"PerSe" => (
|
||||
["per say", "per-se", "per-say"],
|
||||
["per se"],
|
||||
"The correct spelling is `per se` (with no hyphen)",
|
||||
"Corrects common misspellings of `per se`.",
|
||||
LintKind::Spelling
|
||||
),
|
||||
"PointsOfView" => (
|
||||
["point of views"],
|
||||
["points of view"],
|
||||
|
||||
@@ -1444,6 +1444,34 @@ fn corrects_piece_of_mind() {
|
||||
)
|
||||
}
|
||||
|
||||
// PerSe
|
||||
#[test]
|
||||
fn corrects_per_se_hyphenated() {
|
||||
assert_suggestion_result(
|
||||
"It's not a problem per-se, but it would make the desktop more consistent when using QT and KDE apps.",
|
||||
lint_group(),
|
||||
"It's not a problem per se, but it would make the desktop more consistent when using QT and KDE apps.",
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn corrects_per_say() {
|
||||
assert_suggestion_result(
|
||||
"Hi all - not really an issue per say, but more of a request for some suggestions and guidance.",
|
||||
lint_group(),
|
||||
"Hi all - not really an issue per se, but more of a request for some suggestions and guidance.",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn corrects_per_say_hyphenated() {
|
||||
assert_suggestion_result(
|
||||
"Whilst I don't think this is wrong per-say, I'm not confident it is necessary.",
|
||||
lint_group(),
|
||||
"Whilst I don't think this is wrong per se, I'm not confident it is necessary.",
|
||||
);
|
||||
}
|
||||
|
||||
// PointsOfView
|
||||
#[test]
|
||||
fn corrects_points_of_view() {
|
||||
|
||||
Reference in New Issue
Block a user