Skip to content

Commit

Permalink
fix drilldown with md links
Browse files Browse the repository at this point in the history
  • Loading branch information
FredericHeem committed Sep 10, 2024
1 parent 1eaaf08 commit 6adee9b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bau-ui/drillDownMenu/drillDownMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,11 @@ export default function (context, options = {}) {
};

const pathFromHref = ({ target }) => {
const href = target.closest("a").getAttribute("href");
let path = href.replace(baseUrl, "");
let path = `${target
.closest("a")
.pathname.replace(".md", "")
.replace(baseUrl, "")}${target.hash}`;

if (!hashBased) {
path = path.replace(target.hash, "");
}
Expand Down Expand Up @@ -257,7 +260,6 @@ export default function (context, options = {}) {
const anchor = target.closest("a");
if (!anchor) return;
const href = anchor.getAttribute("href");

if (
href &&
!href.startsWith("http") &&
Expand Down

0 comments on commit 6adee9b

Please sign in to comment.