-
Notifications
You must be signed in to change notification settings - Fork 33
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
HDDS-11970. Ignore markdown code blocks in cspell #118
HDDS-11970. Ignore markdown code blocks in cspell #118
Conversation
@jojochuang this should handle the spelling errors you were seeing in other changes. |
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.
Thanks. Confirmed cspell excludes code blocks.
pattern: | | ||
/ | ||
^(\s*`{3,}).* # match the ``` | ||
[\s\S]*? # the block of code |
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.
What is the difference between [\s\S]
and .
?
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.
This is the pattern provided by the cspell docs that I copied here and tested out. ChatGPT says .
will not match newlines and [\s\S]
is a workaround to catch multi-line code blocks. However, when I tested it locally, .
also seemed to work for multiple lines.
Thanks @errose28 for the patch, @jojochuang for the review. |
What changes were proposed in this pull request?
Right now docs frequently have to add inline spelling ignores to code blocks, especially for command line flags like
-Doption
. The CSpell docs provide an example pattern to match multi-line markdown code blocks and only apply it to markdown files. We can add this and a similar pattern to ignore inline code blocks and remove all current inline cspell directives from the docs, since they were only needed for code blocks.What is the link to the Apache Jira?
HDDS-11970
How was this patch tested?