Skip to content

Commit

Permalink
stupid bug
Browse files Browse the repository at this point in the history
  • Loading branch information
farmaazon committed Nov 19, 2024
1 parent bf0c2bd commit 9fa350a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ function parseLinkLike(node: SyntaxNode, doc: Text) {
if (!textClose) return
const urlNode = findNextSiblingNamed(textClose, 'URL')
if (!urlNode) return
console.log('RANGE', urlNode.from, urlNode.to)
console.log(doc)
return {
textFrom: textOpen.to,
textTo: textClose.from,
Expand Down Expand Up @@ -268,7 +270,7 @@ class ImageWidget extends WidgetType {
function findNextSiblingNamed(node: SyntaxNode, name: string) {
for (let sibling = node.nextSibling; sibling != null; sibling = sibling.nextSibling) {
if (sibling.name === name) {
return node
return sibling
}
}
}

0 comments on commit 9fa350a

Please sign in to comment.