From 3049852bfde38b0a38344a2abb4c9a60391ee934 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 30 Jul 2021 10:42:52 -0500 Subject: [PATCH] fix(dict): Avoid contraction false positive Fixes #317 --- CHANGELOG.md | 4 ++++ crates/typos-dict/assets/words.csv | 1 - crates/typos-dict/src/dict_codegen.rs | 3 +-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f829b28..a279db5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] - ReleaseDate +#### Bug Fixes + +- `wasn,was` correction causes problems with `wasn't` + ## [1.1.1] - 2021-07-27 #### Bug Fixes diff --git a/crates/typos-dict/assets/words.csv b/crates/typos-dict/assets/words.csv index f23ac08..1f2cf2a 100644 --- a/crates/typos-dict/assets/words.csv +++ b/crates/typos-dict/assets/words.csv @@ -51772,7 +51772,6 @@ warrriors,warriors warwcik,warwick washignton,washington washingtion,washington -wasn,was wass,was watchdong,watchdog watchemn,watchmen diff --git a/crates/typos-dict/src/dict_codegen.rs b/crates/typos-dict/src/dict_codegen.rs index 38a0c91..630bbe0 100644 --- a/crates/typos-dict/src/dict_codegen.rs +++ b/crates/typos-dict/src/dict_codegen.rs @@ -2545,10 +2545,9 @@ pub static WORD_WAS_CHILDREN: dictgen::DictTable<&'static [&'static str]> = dict keys: &[ dictgen::InsensitiveStr::Ascii("hignton"), dictgen::InsensitiveStr::Ascii("hingtion"), - dictgen::InsensitiveStr::Ascii("n"), dictgen::InsensitiveStr::Ascii("s"), ], - values: &[&["washington"], &["washington"], &["was"], &["was"]], + values: &[&["washington"], &["washington"], &["was"]], range: 1..=8, };