Skip to content

Commit

Permalink
Merge pull request #1 from dictyBase/fix/link-conversion
Browse files Browse the repository at this point in the history
fix(handlers.ts): fix anchor element creation
  • Loading branch information
ktun95 authored Feb 27, 2024
2 parents 8ed3797 + 63481ea commit b04125b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ const anchorElement = (
element: HTMLAnchorElement,
) => {
const content = node.children.at(0)?.text
content && (element.href = content)
const url = node.url
content && (element.textContent = content)
url && (element.href = url)
}

/**
Expand Down

0 comments on commit b04125b

Please sign in to comment.