updated htmlLinkRegex to allow for attributes before the href in anchor tags
This commit is contained in:
parent
9640a37f4a
commit
e99989c268
1 changed files with 1 additions and 1 deletions
2
utils.js
2
utils.js
|
|
@ -11,7 +11,7 @@ export function markdownLinkRegex(url) {
|
||||||
|
|
||||||
export function htmlLinkRegex(url) {
|
export function htmlLinkRegex(url) {
|
||||||
return new RegExp(
|
return new RegExp(
|
||||||
`(<a href="https:\\/\\/${url.replaceAll('.', '\\.')}[^"]*">).*?(<\\/a>)`,
|
`(<a [^>]*href="https:\\/\\/${url.replaceAll('.', '\\.')}[^"]*"[^>]*>).*?(<\\/a>)`,
|
||||||
'i',
|
'i',
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue