-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Excluding included files from spelling check #204
Comments
A literal include directive should cause the content to be ignored, but I haven't actually tested that. There was a similar question about todo directives in #203 where the directive itself is injecting an invalid word into the output. In the cases you present, we may need to do something different to allow the content to be ignored. The builder traverses the parsed document (https://github.com/sphinx-contrib/spelling/blob/master/sphinxcontrib/spelling/builder.py#L217) and looks for specific node types to include. Maybe it needs a way to configure node types to ignore as well, so that they are not traversed. |
I confirm. I have
I am not sure what a good solution would be, but from my point of view it'd be easiest to be able to turn the spellchecker off for some section of the content, a la:
Another solution that would work for me would be a directive that skips spelling for entire nodes along the lines of
|
Sorry for making a mess, I must have misclicked. |
Add a test showing that the `only` directive works for ignoring sections of content that has content that should not be checked. Addresses sphinx-contrib#204
I did some experimenting in #205, and I think you can use the "only" directive for what you want. Something like
|
Add a test showing that the `only` directive works for ignoring sections of content that has content that should not be checked. Addresses sphinx-contrib#204
Another usecase is for |
Let's say a document includes a file via
include
orcsv-table
:Then, the contents are subject to a spellcheck. Some of these should be excluded from spellcheck though, if they include data or program output. But they are apparently always included, even if I list them in
spelling_exclude_patterns
.Is there a way to exclude them?
Listing all the words individually in the enclosing document (e.g. with the
spelling
directive) technically works, but it is impractical because (a) I don't want to exclude checking the spelling of these words from the enclosing document, and (b) it's a big list.The text was updated successfully, but these errors were encountered: