Skip to content

Commit

Permalink
Merge pull request #79 from UmbrellaDocs/fixbug78
Browse files Browse the repository at this point in the history
Updated the code to fix incorrect usage
  • Loading branch information
gaurav-nelson authored Aug 30, 2024
2 parents 59321b9 + 8798e7e commit 5124a6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/extract-asciidoc-links.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function extractAsciiDocLinks(filePath, options) {
const extractLink = line.match(/\[#[^\]]+\]/g)
extractLink.forEach((link) => {
const newAnchor = link.replace(/^\[#|]$/g, '')
const matchIndex = line.indexOf(extractLink[i]) // Get the index of the match
const matchIndex = line.indexOf(link) // Get the index of the match
const startColumn = matchIndex + 2 // Add 2 to account for the [# characters
const endColumn = startColumn + newAnchor.length
const startPosition = {
Expand Down

0 comments on commit 5124a6f

Please sign in to comment.