Skip to content

Commit

Permalink
Fix internal link jump
Browse files Browse the repository at this point in the history
  • Loading branch information
XSAM authored and elias-sundqvist committed Nov 27, 2022
1 parent f28b8ab commit 2e1cc2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ export default class AnnotatorPlugin extends Plugin implements IHasAnnotatorSett
private addMarkdownPostProcessor() {
const markdownPostProcessor = async (el: HTMLElement, ctx: MarkdownPostProcessorContext) => {
for (const link of el.getElementsByClassName('internal-link') as HTMLCollectionOf<HTMLAnchorElement>) {
const parsedLink = parseLinktext(link.href);
const parsedLink = parseLinktext(link.getAttribute("data-href"));
const annotationid = parsedLink.subpath.startsWith('#^') ? parsedLink.subpath.substr(2) : null;
const file: TFile | null = this.app.metadataCache.getFirstLinkpathDest(parsedLink.path, ctx.sourcePath);

Expand Down

0 comments on commit 2e1cc2e

Please sign in to comment.