[ 
https://issues.apache.org/jira/browse/HDDS-17698?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated HDDS-17698:
----------------------------------
    Labels: pull-request-available  (was: )

> Incorrect cspell regex in website causing some content to be missed
> -------------------------------------------------------------------
>
>                 Key: HDDS-17698
>                 URL: https://issues.apache.org/jira/browse/HDDS-17698
>             Project: Apache Ozone
>          Issue Type: Bug
>          Components: CI, test, website
>            Reporter: Ethan Rose
>            Assignee: Ethan Rose
>            Priority: Major
>              Labels: pull-request-available
>
> 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.
> h2. Root cause
> The pattern is:
> {code}
> ^(\s*`\{3,}).*[\s\S]*?^\1
> {code}
> \s* also matches 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.
> h2. Proposed fix
> Restrict the leading whitespace to the same line:
> {code}
> ^([ \t]*`\{3,}).*[\s\S]*?^\1
> {code}
> h2. Impact of the fix
> With the corrected pattern, the spell check reports 170 findings that were 
> previously hidden. These will need to be fixed in this change along with the 
> regex.
> - docs/: 43 findings, including real typos (for example "thourghput", 
> "licence", "Clustrers") and legitimate terms missing from the words list (for 
> example "truststore", "linearizability", "LLM", "Ollama", "kinit")
> - blog/: 2 findings
> - versioned_docs/: 125 findings



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to