I have the words wi-fi, spell-check, line-break in my .dic file.
I want the following suggestions:
wifi -> Suggest wi-fi
spellcheck -> Suggest spell-check
linebreak -> Suggest line-break
What aff setup do I need to allow that?
I have the words wi-fi, spell-check, line-break in my .dic file.
I want the following suggestions:
wifi -> Suggest wi-fi
spellcheck -> Suggest spell-check
linebreak -> Suggest line-break
What aff setup do I need to allow that?
In Typo.js the alphabet of characters that can be used in suggestions is limited to a-z. See line 788 of the source code:
Interestingly, below this line there is a commented out piece of code that determines the alphabet from the dictionary itself, which would have prevented the issue in the question. However, without using that code you can add characters manually in this list. Replace that line in the source by the following:
Then the suggestions will include dictionary items with a hyphen. Code (adapted from https://github.com/cfinke/Typo.js/blob/master/examples/node/index.js):
Dictionary used for testing:
Output: