From fb9ea8dcb85e6d2ac6c2a8cf5057f2fb00871b26 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Tue, 15 Feb 2022 21:52:49 +0000
Subject: [PATCH] Merge branch 'hugo' of https://github.com/jackyzha0/quartz into hugo

---
 layouts/partials/popover.html |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/layouts/partials/popover.html b/layouts/partials/popover.html
index 951f135..3a7de11 100644
--- a/layouts/partials/popover.html
+++ b/layouts/partials/popover.html
@@ -7,10 +7,11 @@
     return template.content.firstChild
   }
 
-  const pathRegex = /\.\.(\/\.\.)*/
+  const pathRegex = /\.\.?(\/\.\.)*/
   document.addEventListener("DOMContentLoaded", () => {
     [...document.getElementsByClassName("internal-link")]
       .forEach(li => {
+        console.log(li.dataset.src.replace(pathRegex, ''))
         const linkDest = content[li.dataset.src.replace(pathRegex, '')]
         if (linkDest) {
           const popoverElement = `<div class="popover">

--
Gitblit v1.10.0