From 666ffebe90c04dc7fe064a98232538826af70738 Mon Sep 17 00:00:00 2001 From: Pavol Komlos <62595149+plundration@users.noreply.github.com> Date: Wed, 12 Oct 2022 17:21:28 +0200 Subject: [PATCH] Decode the heading id from split link (#214) --- assets/js/popover.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/popover.js b/assets/js/popover.js index 3d7a30c..29104b9 100644 --- a/assets/js/popover.js +++ b/assets/js/popover.js @@ -27,7 +27,7 @@ function initPopover(baseURL, useContextualBacklinks, renderLatex) { let splitLink = li.href.split("#") let cleanedContent = removeMarkdown(linkDest.content) if (splitLink.length > 1) { - let headingName = splitLink[1].replace(/\-/g, " ") + let headingName = decodeURIComponent(splitLink[1]).replace(/\-/g, " ") let headingIndex = cleanedContent.toLowerCase().indexOf("" + headingName + "") cleanedContent = cleanedContent.substring(headingIndex, cleanedContent.length) }