-
Notifications
You must be signed in to change notification settings - Fork 0
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
namespell: Ignore text inside code blocks #14
Conversation
Signed-off-by: Pawel Langowski <[email protected]>
The changes have been tested on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Add `inline code`, script still fails in e.g. Zarhus docs
- Make it configurable (via e.g.
--ignore-codeblocks
) e.g. (not tested)
parser.add_argument(
"-i",
"--ignore-codeblocks",
action="store_true",
default=False,
help="Ignore codeblocks",
)
Signed-off-by: Pawel Langowski <[email protected]>
…se mode Signed-off-by: Pawel Langowski <[email protected]>
I think you need some test files to make sure namespell works as intended and there are no regressions. Not sure if you can disable rule on next line as it's usually done in other checkers e.g. (...)
# namespell:disable
disable only this line
(...) This file should probably show no errors: Currently:
|
@m-iwanicki code blocks shouldn't contain triple backticks, that's why i didn't add support for this. If you delete them form line 19, then namespell only shows errors with inline code. |
@PLangowski Are you sure?
Or
Or
Each block is formatted and displayed correctly by GitHub or other markdown parsers. Your code will silently fail in this case and it'd be very hard to know it isn't working correctly. |
For now I was able to implement ignoring inline code/comments 48dffcb |
3c3737f
to
45e964d
Compare
Signed-off-by: Pawel Langowski <[email protected]>
Signed-off-by: Pawel Langowski <[email protected]>
45e964d
to
48dffcb
Compare
Signed-off-by: Pawel Langowski <[email protected]>
@m-iwanicki The cases you've presented are quite difficult to implement, and aren't that widely used. I agree that they're valid, but maybe we could track them in another issue and try to implement them in the future? |
@PLangowski I guess that's ok. |
Can we merge this then? |
Looks ok, but fix pre-commit failures before merging |
Signed-off-by: Pawel Langowski <[email protected]>
@m-iwanicki done |
No description provided.