We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ed138a8 + 4cd57d6 commit 6f808baCopy full SHA for 6f808ba
1 file changed
src/plugins/links.js
@@ -158,6 +158,11 @@ export function linkClicking() {
158
click: (view, event) => {
159
const linkEl = event.target.closest('a')
160
if (event.button === 0 && linkEl) {
161
+ // No special handling in mermaid diagrams to not break links there
162
+ if (linkEl.closest('svg[id^="mermaid-view"]')) {
163
+ return false
164
+ }
165
+
166
event.preventDefault()
167
if (isLinkToSelfWithHash(linkEl.attributes.href?.value)) {
168
// Open anchor links directly
0 commit comments