Skip to content

Commit

Permalink
Add attribute lists to CSpell ignoreRegExpList
Browse files Browse the repository at this point in the history
CSpell (Code Spell Checker) supports custom ignore patterns that can be
added to the `ignoreRegExpList` in its `cspell.json` configuration file.
The configuration file previously was configured to ignore Markdown
fenced code blocks (like '```sh'), but not the extended Markdown syntax
used in Python Markdown attribute lists. These attribute lists are used
by Material for MkDocs to enable or disable code block copy behavior
(code blocks like '```{ .sh .no-copy }').

This commit will update the `ignoreRegExpList` to ignore fenced code
blocks with attribute lists.

https://cspell.org/configuration/
streetsidesoftware/cspell#206
https://squidfunk.github.io/mkdocs-material/reference/code-blocks/
  • Loading branch information
br3ndonland committed Nov 12, 2023
1 parent 5343cff commit e3d8d06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cspell.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"ignorePaths": ["CHANGELOG.md", "**/*changelog.md"],
"ignoreRegExpList": ["/(```+)\\s?[a-z][\\s\\S]+?\\1/g", "/`([\\s\\S]+?)`/g"],
"ignoreRegExpList": ["/(`{3})[\\s\\S]+?\\1/g", "/`([\\s\\S]+?)`/g"],
"languageSettings": [
{
"languageId": "python",
Expand Down

0 comments on commit e3d8d06

Please sign in to comment.