mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-21 21:30:47 +02:00
Refactor RegExps to avoid the possibility of polynomial backtracking (fixes #657).
This commit is contained in:
parent
9b1840a5a4
commit
e0219411c6
8 changed files with 14 additions and 16 deletions
|
@ -525,7 +525,7 @@ specify a custom `RegExp` or use the value `null` to disable the feature.
|
|||
The default value:
|
||||
|
||||
```javascript
|
||||
/((^---\s*$[\s\S]+?^---\s*)|(^\+\+\+\s*$[\s\S]+?^(\+\+\+|\.\.\.)\s*)|(^\{\s*$[\s\S]+?^\}\s*))(\r\n|\r|\n|$)/m
|
||||
/((^---[^\S\r\n\u2028\u2029]*$[\s\S]+?^---\s*)|(^\+\+\+[^\S\r\n\u2028\u2029]*$[\s\S]+?^(\+\+\+|\.\.\.)\s*)|(^\{[^\S\r\n\u2028\u2029]*$[\s\S]+?^\}\s*))(\r\n|\r|\n|$)/m
|
||||
```
|
||||
|
||||
Ignores [YAML](https://en.wikipedia.org/wiki/YAML),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue