Commit 296fd8c
committed
Make Colons exemptable through a project Vocab
Amends the previous commit, which claimed the proper-noun exemption
couldn't be expressed. It can — Vale applies Vocab accept.txt entries as
exceptions to any check, not only Vale.Spelling and Vale.Terms.
Two things stopped it working here:
- the token matched ': C', so the matched text was never the proper
noun and there was nothing for the vocabulary to compare against
- `nonword: true` opts out of vocabulary matching altogether
Matching the word itself via a lookbehind, and dropping `nonword`, makes
`accept.txt` work exactly as reported in issue #20: with Kubernetes in a
project vocabulary, "You need one thing: Kubernetes." is now silent while
"... : Terraform." still flags.
The notice-label exemptions move into the lookbehind so they still apply
now that the match starts at the word. Alerts also read better:
"'Concise' should be in lowercase" rather than "': C'".1 parent a343f3e commit 296fd8c
2 files changed
Lines changed: 9 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | | - | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
0 commit comments