Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
fix(core): stop flagging "Czech Republic" as outdated (#2692) (#2797)
Naveen Prasanthf25e1ef4eb44
diff --git a/harper-core/src/linting/update_place_names.rs b/harper-core/src/linting/update_place_names.rsindex 591a014e7..55f448c8a 100644--- a/harper-core/src/linting/update_place_names.rs+++ b/harper-core/src/linting/update_place_names.rs@@ -29,7 +29,6 @@ impl<'a> Default for UpdatePlaceNames<'a> {((1945, "Taiwan"), &["Formosa"]),((1991, "Ulaanbaatar"), &["Ulan Bator"]),// Europe (and nearby)- ((2016, "Czechia"), &["Czech Republic"]),((1945, "Gdańsk"), &["Danzig"]), // TODO: Can we recommend Gdansk as well?((1992, "Podgorica"), &["Titograd"]),((1936, "Tbilisi"), &["Tiflis"]),@@ -249,6 +248,15 @@ mod tests {)}+ #[test]+ fn dont_flag_czech_republic() {+ assert_lint_count(+ "The Czech Republic is in Europe.",+ UpdatePlaceNames::default(),+ 0,+ );+ }+// NOTE: Can't handle place names with obligatory or compulsory "The" perfectly.#[test]fn update_to_name_with_punctuation() {