Skip to content

Commit bdd42b4

Browse files
committed
Spellcheck: also ignore code blocks inside blockquotes
The existing regex pattern for ignoring code blocks only matched blocks at the start of a line (with optional whitespace). This update makes it also match code blocks inside markdown blockquotes, where lines are prefixed with `>`.
1 parent bc0b73c commit bdd42b4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.cspell.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ patterns:
1212
- name: markdown_code_block
1313
pattern: |
1414
/
15-
^(\s*`{3,})[a-z]+ # match the ``` with a language modifier
16-
[\s\S]*? # the block of code
17-
^\1 # end of the block
15+
^((?:>\s*)?`{3,})[a-z]+ # match the ``` with a language modifier, optionally inside a blockquote
16+
[\s\S]*? # the block of code
17+
^\1 # end of the block
1818
/gmx
1919
- name: markdown_inline_code
2020
pattern: /(\s*`)[^`\n]{3,}`/gmx

0 commit comments

Comments
 (0)