HDDS-11970. Ignore markdown code blocks in cspell#118
Merged
adoroszlai merged 5 commits intoDec 21, 2024
Merged
Conversation
Contributor
Author
|
@jojochuang this should handle the spelling errors you were seeing in other changes. |
jojochuang
approved these changes
Dec 20, 2024
Contributor
jojochuang
left a comment
There was a problem hiding this comment.
Thanks. Confirmed cspell excludes code blocks.
adoroszlai
approved these changes
Dec 20, 2024
| pattern: | | ||
| / | ||
| ^(\s*`{3,}).* # match the ``` | ||
| [\s\S]*? # the block of code |
Contributor
There was a problem hiding this comment.
What is the difference between [\s\S] and .?
Contributor
Author
There was a problem hiding this comment.
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.
Contributor
|
Thanks @errose28 for the patch, @jojochuang for the review. |
jojochuang
pushed a commit
to jojochuang/ozone-site
that referenced
this pull request
Jul 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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?