errose28 opened a new pull request, #596:
URL: https://github.com/apache/ozone-site/pull/596
## What changes were proposed in this pull request?
Generated by Claude Sonnet 5.5
The `markdown_code_block` pattern in cspell.yaml is meant to exclude fenced
code blocks from spell checking. It mis-pairs opening and closing fences, so in
many pages it ignores prose and checks code instead. Typos in the ignored prose
are not reported, and `.github/scripts/spelling.sh` passes when it shouldn't.
### Root cause
The current pattern is:
```
^(\s*`\{3,}).*[\s\S]*?^\1
```
`\s*` matches all whitespace including newlines. An opening fence is usually
preceded by a blank line, so the regex starts matching at that blank line and
captures the newline in group 1 `("\n```")`. The closing fence may be preceded
by a code line, not a blank line, so `^\1` won't match it. The match continues
to the next blank line plus fence, which is the opening fence of the next code
block.
From that point the pairing is inverted: prose between blocks is treated as
code and ignored, and code blocks are checked as prose. The effect depends on
each page's fence layout, so it is hard to notice.
### Proposed fix
Restrict the leading whitespace to just spaces and tabs, which must occur on
the same line:
```
^([ \t]*`\{3,}).*[\s\S]*?^\1
```
### Resulting Changes
All spelling issues that were missed have been fixed. This is captured in
the first commit. Later commits make additional spelling improvements to
related areas such as using code blocks instead of spelling ignores and using
more focused page-local ignore patterns. Previous doc versions were updated
since they are run through the same set of spell checks as the latest docs.
## What is the link to the Apache Jira?
HDDS-17698
## How was this patch tested?
- cspell used to pass before the change. By just fixing the regex, it
correctly catches pre-existing typos.
- cspell passes with the new regex and spelling fixes applied.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]