mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Fix helpers.referenceLinkRe to handle full and shortcut reference image links inside normal links (fixes #571).
This commit is contained in:
parent
62060aaf21
commit
6974cd6012
5 changed files with 51 additions and 23 deletions
|
|
@ -36,7 +36,7 @@ module.exports.blockquotePrefixRe = blockquotePrefixRe;
|
|||
|
||||
// Regular expression for reference links (full, collapsed, and shortcut)
|
||||
const referenceLinkRe =
|
||||
/!?\\?\[((?:\[[^\]\0]*]|[^\]\0])*)](?:(?:\[([^\]\0]*)\])|([^(])|$)/g;
|
||||
/!?\\?\[((?:\[[^\]\0]*]|[^[\]\0])*)](?:(?:\[([^\]\0]*)\])|([^(])|$)/g;
|
||||
|
||||
// Regular expression for link reference definitions
|
||||
const linkReferenceDefinitionRe = /^ {0,3}\[([^\]]*[^\\])]:/;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue