-
-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to ignore code snippets in markdown files? #206
Comments
You have a few options: One of them is to use comments:
The The other option is to fix the regex: "ignoreRegExpList": [
"/(```+)\\s?sh[\\s\\S]+?\\1/g", // shell script code block
....
] |
Thanks @Jason3S ! What I don't understand is why the original regex I used didn't work. I tested it with https://regex101.com/ (js regex) and it worked. |
|
Thanks @Jason3S!! I thought the /s modifier takes care of that.... |
Configure VSCodium code-spell-checker cspell.json to ignore Markdown code blocks Regex source (updated for code languages other than shell): streetsidesoftware/cspell#206 Instructions for configuring code-spell-checker: https://github.com/streetsidesoftware/cspell/tree/master/packages/cspell Note that extra backslashes are required for JavaScript. To match patterns with online regex checkers like regex101.com and regexr.com, remove the extra backslashes: /(```+)\s?[a-z][\s\S]+?\1/g developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
Configure VSCodium code-spell-checker cspell.json to ignore Markdown code blocks Regex source (updated for code languages other than shell): streetsidesoftware/cspell#206 Instructions for configuring code-spell-checker: https://github.com/streetsidesoftware/cspell/tree/master/packages/cspell Note that extra backslashes are required for JavaScript. To match patterns with online regex checkers like regex101.com and regexr.com, remove the extra backslashes: /(```+)\s?[a-z][\s\S]+?\1/g developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
Configure VSCodium code-spell-checker cspell.json to ignore Markdown code blocks Regex source (updated for code languages other than shell): streetsidesoftware/cspell#206 Instructions for configuring code-spell-checker: https://github.com/streetsidesoftware/cspell/tree/master/packages/cspell Note that extra backslashes are required for JavaScript. To match patterns with online regex checkers like regex101.com and regexr.com, remove the extra backslashes: /(```+)\s?[a-z][\s\S]+?\1/g developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I'm using cspell to spell check all the .md files in our repo.
delimiters.
I want to ignore the shell script code snippets within
sh and
I'm using ignoreRegExpList as follows:
All pattern matches are ignored, except for the first one for the shell code snippets.
The text was updated successfully, but these errors were encountered: