From 666ffebe90c04dc7fe064a98232538826af70738 Mon Sep 17 00:00:00 2001
From: Pavol Komlos <62595149+plundration@users.noreply.github.com>
Date: Wed, 12 Oct 2022 15:21:28 +0000
Subject: [PATCH] Decode the heading id from split link (#214)

---
 assets/js/popover.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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 @@
             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("<b>" + headingName + "</b>")
               cleanedContent = cleanedContent.substring(headingIndex, cleanedContent.length)
             }

--
Gitblit v1.10.0