1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-02-04 19:16:07 +02:00

Desktop: Fixes #3618: Fix links within Mermaid documents

This commit is contained in:
Laurent Cozic 2020-09-02 22:44:24 +01:00
parent b1af25ea18
commit 6b49f1dfcc

View File

@ -63,7 +63,7 @@ webviewLib.getParentAnchorElement = function(element) {
}
if (!element) return null;
if (element.nodeName === 'A') return element;
if (element.nodeName.toUpperCase() === 'A') return element;
element = element.parentElement;
}
};
@ -99,7 +99,7 @@ document.addEventListener('click', function(event) {
// Note that we already handle some links in html_inline.js, however not all of them
// go through this plugin, in particular links coming from third-party packages such
// as Katex.
// as Katex or Mermaid.
if (!anchor.hasAttribute('data-from-md')) {
if (webviewLib.handleInternalLink(event, anchor)) return;
event.preventDefault();