-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(ref): Add dotall specifier to block ignore
Needed a `(?s)` to match multiple enclosed newlines. And added a non-greedy modifier and matching test to prevent double blocks from causing intermediate lines to be ignored: ```shell # spellchecker:off should be ignored # spellchecker:on should not be ignored # without non-greedy, this is also ignored # spellchecker:off should be ignored # spellchecker:on ```
- Loading branch information
Showing
4 changed files
with
10 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[default] | ||
extend-ignore-re = ["#\\s*spellchecker:off\\s*\\n.*\\n\\s*#\\s*spellchecker:on"] | ||
extend-ignore-re = ["(?s)(#|//)\\s*spellchecker:off.*?\\n\\s*(#|//)\\s*spellchecker:on"] | ||
|
||
[default.extend-identifiers] | ||
hello = "goodbye" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
hello | ||
# spellchecker:off | ||
hello | ||
# spellchecker:on | ||
henlo | ||
// spellchecker:on | ||
hello | ||
// ensure greedy doesn't exclude everything across blocks | ||
# spellchecker:off | ||
# spellchecker:on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters