mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-26 13:26:22 +00:00
fix: trim trailing slash when calculating popover
This commit is contained in:
parent
81fe2d2493
commit
6e6dd4cb0b
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@ function initPopover(baseURL) {
|
||||||
links
|
links
|
||||||
.filter(li => li.dataset.src)
|
.filter(li => li.dataset.src)
|
||||||
.forEach(li => {
|
.forEach(li => {
|
||||||
const linkDest = content[li.dataset.src.replace(basePath, "")]
|
const linkDest = content[li.dataset.src.replace(/\/$/g, "").replace(basePath, "")]
|
||||||
if (linkDest) {
|
if (linkDest) {
|
||||||
const popoverElement = `<div class="popover">
|
const popoverElement = `<div class="popover">
|
||||||
<h3>${linkDest.title}</h3>
|
<h3>${linkDest.title}</h3>
|
||||||
|
|
Loading…
Reference in a new issue