mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Fix an instance of "Polynomial regular expression used on uncontrolled data".
This commit is contained in:
parent
96699459d1
commit
3ba2df7386
2 changed files with 3 additions and 2 deletions
|
@ -27,7 +27,8 @@ module.exports.orderedListItemMarkerRe = /^[\s>]*0*(\d+)[.)]/;
|
|||
const emphasisMarkersRe = /[_*]/g;
|
||||
|
||||
// Regular expression for inline links and shortcut reference links
|
||||
const linkRe = /(\[(?:[^[\]]|\[[^\]]*\])*\])(\(\S*\)|\[\S*\])?/g;
|
||||
const linkRe =
|
||||
/(?:|(?<![^[]))(\[(?:[^[\]]?(?:\[[^[\]]*\])?)*\])(\([^)]*\)|\[[^\]]*\])?/g;
|
||||
module.exports.linkRe = linkRe;
|
||||
|
||||
// Regular expression for empty inline links
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue