mirror of
https://github.com/quartz-community/utils.git
synced 2026-07-22 02:50:27 +00:00
fix: block links resolution casing issues
This commit is contained in:
parent
7a43501ac1
commit
2f2f5da516
1 changed files with 5 additions and 1 deletions
|
|
@ -206,7 +206,11 @@ export function splitAnchor(link: string): [string, string] {
|
|||
if (fp!.endsWith(".pdf")) {
|
||||
return [fp!, anchor === undefined ? "" : `#${anchor}`];
|
||||
}
|
||||
const slugged = anchor === undefined ? "" : "#" + slugAnchor(anchor);
|
||||
if (anchor === undefined) {
|
||||
return [fp!, ""];
|
||||
}
|
||||
const bare = anchor.startsWith("^") ? anchor.slice(1) : anchor;
|
||||
const slugged = "#" + slugAnchor(bare);
|
||||
return [fp!, slugged];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue