Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
feat: fixed issues with sentence terminators in lists and added new matchers and words
Elijah Potter1e642e504b9d
diff --git a/harper-core/dictionary.dict b/harper-core/dictionary.dictindex 63b4e8464..49966e473 100644--- a/harper-core/dictionary.dict+++ b/harper-core/dictionary.dict@@ -11689,7 +11689,8 @@ alligator/MSalliterate/DSXGNValliteration/Malliterative/Y-allocate/ADSGNY+allocate/ADSGNYC+allocator/Callocation/AMallocationsallot/LS@@ -30078,6 +30079,7 @@ legacy/SMlegal/SMYlegalese/Mlegalism/MS+legalist/Slegalisticlegalisticallylegality/SM@@ -35549,7 +35551,7 @@ parricide/MSparringparrot/GMDSparry/GDSM-parse/DRSG+parse/DRSGTparsec/MSparsimonious/Yparsimony/M@@ -44113,7 +44115,7 @@ submerse/GNDSsubmersible/MSsubmersion/Msubmicroscopic-submission/MS+submission/MSAsubmissive/PYsubmissiveness/Msubmit/AS@@ -49610,3 +49612,13 @@ LADARTODOstructWASM+hackathon/S+pseudocode/MG+Zettelkasten+OAuth+MacOS+SVG/s+URI/s+suprachiasmatic+cannabinoids+eudaimoniadiff --git a/harper-core/src/linting/matcher.rs b/harper-core/src/linting/matcher.rsindex 6f7b6f68a..03760f48f 100644--- a/harper-core/src/linting/matcher.rs+++ b/harper-core/src/linting/matcher.rs@@ -99,6 +99,9 @@ impl Matcher {// This match list needs to be automatically expanded instead of explicitly// defined like it is now.let mut triggers = pt! {+ "hashtable" => "hash table",+ "hashmap" => "hash map",+ "CCP" => "Chinese Communist Party","dep" => "dependency","deps" => "dependencies","off","the","cuff" => "off-the-cuff",diff --git a/harper-core/src/parsers/markdown.rs b/harper-core/src/parsers/markdown.rsindex 46d1b6401..cfc16aa3b 100644--- a/harper-core/src/parsers/markdown.rs+++ b/harper-core/src/parsers/markdown.rs@@ -41,7 +41,7 @@ impl Parser for Markdown {pulldown_cmark::Event::End(pulldown_cmark::TagEnd::Paragraph)| pulldown_cmark::Event::End(pulldown_cmark::TagEnd::Item) => tokens.push(Token {span: Span::new_with_len(traversed_chars, 1),- kind: TokenKind::Newline(1)+ kind: TokenKind::Newline(2)}),pulldown_cmark::Event::End(_) => {stack.pop();diff --git a/harper-core/src/parsers/mod.rs b/harper-core/src/parsers/mod.rsindex fa37b2c16..b19f2ce16 100644--- a/harper-core/src/parsers/mod.rs+++ b/harper-core/src/parsers/mod.rs@@ -88,7 +88,7 @@ mod tests {Word,Space(1),Word,- Newline(1)+ Newline(2)]);}@@ -102,11 +102,11 @@ mod tests {Space(1),Word,Punctuation(Punctuation::Comma),- Newline(1),+ Newline(2),Word,Space(1),Word,- Newline(1)+ Newline(2)]);}diff --git a/harper-core/src/spell/hunspell/mod.rs b/harper-core/src/spell/hunspell/mod.rsindex 3da32836b..27e954a8a 100644--- a/harper-core/src/spell/hunspell/mod.rs+++ b/harper-core/src/spell/hunspell/mod.rs@@ -86,6 +86,11 @@ mod tests {assert!(build_expanded().contains(&split("giants")));}+ #[test]+ fn expanded_contains_deallocate() {+ assert!(build_expanded().contains(&split("deallocate")));+ }+fn split(text: &str) -> DictWord {text.chars().collect()}diff --git a/harper-ls/README.md b/harper-ls/README.mdindex 7eb54cea6..c3b1ce471 100644--- a/harper-ls/README.md+++ b/harper-ls/README.md@@ -67,7 +67,7 @@ lspconfig.harper_ls.setup {an_a = true,sentence_capitalization = true,unclosed_quotes = true,- wrong_quotes = true,+ wrong_quotes = false,long_sentences = true,repeated_words = true,spaces = true,