Closed grhm closed 1 year ago
Yes, the current role adds the word to the list for the document. If you wanted to code up a different role to ignore a word one time (maybe spelling:ignore
?), that seems like it would be a good addition. I'm not sure exactly how that could be made to work. Perhaps filtering the word out when tokenizing?
The documentation at https://sphinxcontrib-spelling.readthedocs.io/en/latest/customize.html#private-dictionaries says:
I'd read that to mean I can markup a single instance of a word as correctly spelled, but it would still be flagged as incorrect elsewhere. This is ideal for marking up some text as correct e.g. words in a quote taken verbatim from somewhere else, that we don't want to alter, don't want to be flagged a misspelt, but don't want to add the the dictionary and allow elsewhere in the document.
For example, I thought this would work in a project using en_GB:
However, it appears to use the spelling:word role to add to the wordlist for the entire document. The sphinx output says "Extending local dictionary for". And the word is not flagged as misspelt as I had hoped.
Is that the intention? Is there any difference between the spelling:word role and the spelling:word-list directive?
Is there a way to ignore a single instance of a word?
The use cases I'm interested in for my current project are: