mirror of
https://github.com/crate-ci/typos.git
synced 2024-11-21 16:41:01 -05:00
Merge pull request #1026 from noahp/noahp/dotall
docs(ref): Add dotall specifier to block ignore
This commit is contained in:
commit
160c60dfce
4 changed files with 10 additions and 6 deletions
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -8,9 +8,9 @@ error: `hello` should be `goodbye`
|
|||
| ^^^^^
|
||||
|
|
||||
error: `hello` should be `goodbye`
|
||||
--> ./file.ignore:5:1
|
||||
--> ./file.ignore:6:1
|
||||
|
|
||||
5 | hello
|
||||
6 | hello
|
||||
| ^^^^^
|
||||
|
|
||||
"""
|
||||
|
|
|
@ -39,8 +39,8 @@ Configuration is read from the following (in precedence order)
|
|||
| type.\<name>.extend-glob | \- | list of strings | File globs for matching `<name>` |
|
||||
|
||||
Common `extend-ignore-re`:
|
||||
- Line ignore with trailing `# spellchecker:disable-line`: `"(?Rm)^.*#\\s*spellchecker:disable-line$"`
|
||||
- Line block with `# spellchecker:<on|off>`: `"#\\s*spellchecker:off\\s*\\n.*\\n\\s*#\\s*spellchecker:on"`
|
||||
- Line ignore with trailing `# spellchecker:disable-line`: `"(?Rm)^.*(#|//)\\s*spellchecker:disable-line$"`
|
||||
- Line block with `# spellchecker:<on|off>`: `"(?s)(#|//)\\s*spellchecker:off.*?\\n\\s*(#|//)\\s*spellchecker:on"`
|
||||
|
||||
Common `extend-ignore-identifiers-re`:
|
||||
- SSL Cipher suites: `"\\bTLS_[A-Z0-9_]+(_anon_[A-Z0-9_]+)?\\b"`
|
||||
|
|
Loading…
Reference in a new issue