Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
extractAsciiDocLinks to remove trailing period from extracted URLs
Browse files Browse the repository at this point in the history
theskillwithin committed Dec 11, 2024
1 parent 95ca53e commit e5e0b2f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/extract-asciidoc-links.js
Original file line number Diff line number Diff line change
@@ -37,7 +37,9 @@ function extractAsciiDocLinks(filePath, options) {
// Extract external hyperlinks
let match
while ((match = urlRegex.exec(line)) !== null) {
const url = match[0].replace(/^link:/, '') // Remove 'link:' prefix if present
const url = match[0]
.replace(/^link:/, '') // Remove 'link:' prefix if present
.replace(/\.$/, '') // Remove trailing period if present
const position = {
start: {
line: lineNumber,

0 comments on commit e5e0b2f

Please sign in to comment.