Skip to content

Commit

Permalink
fix: support English contractions in Ada files. (#1277)
Browse files Browse the repository at this point in the history
fixes #1276
  • Loading branch information
Jason3S committed Jul 23, 2022
1 parent 30bfd1a commit ec0895e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dictionaries/ada/cspell-ext.json
Expand Up @@ -20,7 +20,7 @@
"patterns": [
{
"name": "ada word break",
"pattern": "/(?<=\\w)['](?=\\w)/g",
"pattern": "/(?<=\\w)['](?=\\w)(?!((?<=n')t|ve|d|ll|m|s|re)\\b)/g",
"description": "Ada Word Break"
},
{
Expand Down
1 change: 1 addition & 0 deletions dictionaries/ada/cspell.json
Expand Up @@ -6,6 +6,7 @@
"dictionaries": [
"ada"
],
"enableFiletypes": ["ada"],
"import": [
"./cspell-ext.json"
]
Expand Down
4 changes: 3 additions & 1 deletion dictionaries/ada/package.json
Expand Up @@ -12,7 +12,9 @@
},
"scripts": {
"build": "cspell-tools compile \"ada.txt\" -o .",
"test": "head -n 100 \"ada.txt\" | cspell -v -c ./cspell-ext.json --local=* --languageId=ada stdin",
"test": "yarn run test-dict && yarn run test-samples",
"test-dict": "head -n 100 \"ada.txt\" | cspell -v -c ./cspell-ext.json --local=* --languageId=ada stdin",
"test-samples": "cspell \"samples/**\"",
"prepublishOnly": "echo pre-publish",
"prepare": "yarn run build"
},
Expand Down
9 changes: 9 additions & 0 deletions dictionaries/ada/samples/issue-1276/test.adb
@@ -0,0 +1,9 @@
with Ada.Text_IO;

-- Related to [issue-1276](https://github.com/streetsidesoftware/cspell-dicts/issues/1276)

procedure Test is
begin
-- This didn't spell check properly.
Ada.Text_IO.Put_Line(Integer'Image(5));
end Test;

0 comments on commit ec0895e

Please sign in to comment.