-
Notifications
You must be signed in to change notification settings - Fork 705
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a spelling mistake which made it through to go docs. gospel 1.13.0 is now out, and it added features which let us remove some old words (eg, pluralizations of types we define), but it also errored out on seeing a comment in .words which used to be acceptable. So remove comments from .words and introduce .words.readme instead. We lose the section-introducer comments. Which is a shame.
- Loading branch information
1 parent
f52eb7b
commit 9b8bfef
Showing
3 changed files
with
28 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
The .words file is used by gospel (v1.2+), which wraps the Hunspell libraries | ||
but populates the dictionary with identifiers from the Go source. | ||
|
||
<https://github.com/kortschak/gospel> | ||
|
||
Alas, no comments are allowed in the .words file and newer versions of gospel | ||
error out on seeing them. This is really a hunspell restriction. | ||
|
||
We assume en_US hunspell dictionaries are installed and used. | ||
The /AFFIXRULES are defined in en_US.aff (eg: /usr/share/hunspell/en_US.aff) | ||
Invoke `hunspell -D` to see the actual locations. | ||
|
||
Words which are in the base dictionary can't have extra affix rules added to | ||
them, so we have to start with the affixed variant we want to add. | ||
Thus `creds` rather than `cred/S` and so on. | ||
|
||
So we can't use receive/DRSZGBU, adding 'U', to allow unreceive and variants, | ||
we have to use unreceive as the stem. | ||
|
||
We can't define our own affix or compound rules, | ||
to capture rfc\d{3,} or 0x[0-9A-Fa-f]{2} | ||
|
||
The spelling tokenizer doesn't take "permessage-deflate" as allowing for ... | ||
"permessage-deflate", which is an RFC7692 registered extension for websockets. | ||
We have to explicitly list "permessage". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters