You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a sphinx build that is embedded in a larger build process and adding/editing the conf.py that is generated is non-trivial.
We have been adding our custom word list via a -D spelling_word_list_filename=my_words.txt parameter on the sphinx command line.
The documentation says you can use multiple text files with words to be added to the dictionary, if you set the spelling_word_list_filename to a list. This works if you set the list in the conf.py file, but using a -D parameter only allows the addition of a single word list. We'd like to add several, but the way that command line parameter is handled, it is always given to sphinxcontrib-spelling as a string.
It would be nice if I could add a list of filenames via -D spelling_word_list_filename=[my_words.txt,other_words.txt] or some similar format.
Add tests for previous work to support multiple wordlist filenames.
Clean up documentation for the configuration option.
Refactor wordlist filename handling in the builder to make it more
testable.
Fixessphinx-contrib#169
I have a sphinx build that is embedded in a larger build process and adding/editing the conf.py that is generated is non-trivial.
We have been adding our custom word list via a
-D spelling_word_list_filename=my_words.txt
parameter on the sphinx command line.The documentation says you can use multiple text files with words to be added to the dictionary, if you set the spelling_word_list_filename to a list. This works if you set the list in the conf.py file, but using a -D parameter only allows the addition of a single word list. We'd like to add several, but the way that command line parameter is handled, it is always given to sphinxcontrib-spelling as a string.
It would be nice if I could add a list of filenames via
-D spelling_word_list_filename=[my_words.txt,other_words.txt]
or some similar format.Looking at the code, I think a small change in builder.py to check the incoming string and, if it starts and ends with square brackets, split it into a list would work.
i.e. just before Line 109 (https://github.com/sphinx-contrib/spelling/blob/master/sphinxcontrib/spelling/builder.py#L109).
Would you consider adding this? If so, I can probably contribute a pull request to add it.
The text was updated successfully, but these errors were encountered: