Skip to content

Commit a348d58

Browse files
committed
prevent default on annotation links
1 parent 5a48b37 commit a348d58

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/format/html/format-html.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,9 @@ function processLineAnnotation(
862862
kCodeAnnotationTargetAttr,
863863
`${targetAnnotation}`,
864864
);
865+
if (!interactive) {
866+
annoteAnchorEl.setAttribute("onclick", "event.preventDefault();");
867+
}
865868
annoteAnchorEl.innerText = targetAnnotation || "?";
866869
targetEl.parentElement?.insertBefore(annoteAnchorEl, targetEl);
867870
targetEl.classList.add(kCodeAnnotationTargetClz);

0 commit comments

Comments
 (0)