Skip to content

Commit

Permalink
fix regex period
Browse files Browse the repository at this point in the history
  • Loading branch information
theskillwithin committed Dec 11, 2024
1 parent 95ca53e commit 3431e61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/extract-asciidoc-links.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,11 +386,11 @@ function extractAsciiDocLinks(filePath, options) {
}
if (
line.match(
/(?:^|<|[\s>\(\)\[\];])((https?|file|ftp|irc):\/\/[^\s\[\]<]*[^\s.,\[\]<\)])/g
/((https?|file|ftp|irc):\/\/[^\s\[\]<]*?(?<![\s.])[^\s\[\]<](?<!\.))(?=\s|$)/g
)
) {
let extractLink = line.match(
/((https?|file|ftp|irc):\/\/[^\s\[\]<]*[^\s.,\[\]<\)])/g
/((https?|file|ftp|irc):\/\/[^\s\[\]<]*?(?<![\s.])[^\s\[\]<](?<!\.))(?=\s|$)/g
)
for (let i = 0; i < extractLink.length; i++) {
let newReference = extractLink[i]
Expand Down

0 comments on commit 3431e61

Please sign in to comment.