Skip to content

Commit 089f485

Browse files
authored
Do not spellcheck URLs (#2993)
#2965 added support to spellcheck TOCs, but this has the side-effect of also checking URLs. Unfortunately, there are some words that are valid in a URL but shouldn't be added to the dictionary as they're not valid elsewhere. One example of this is `grovers`; usually this should be corrected to `Grover's`, but it _is_ valid in a URL. Since we can't add file-level ignores in the `_toc.json`, I think the best approach is to ignore these URLs using a regex. This is not a problem on `main`, but it's blocking CI in #2978.
1 parent cc50fd0 commit 089f485

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/config/cspell/cSpell.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
// Method use, e.g. Class.foo()
4848
"([a-zA-Z_]\\w*)\\.[a-zA-Z_\\.]*",
4949
// Words with numbers in them, which are usually code
50-
"[a-zA-Z]+\\d+[a-zA-Z\\d]*"
50+
"[a-zA-Z]+\\d+[a-zA-Z\\d]*",
51+
// TOC URLs
52+
"^\\s+\"url\": \".+\""
5153
]
5254
}

0 commit comments

Comments
 (0)