Skip to content

Commit

Permalink
Merge branch 'master' into clean_build
Browse files Browse the repository at this point in the history
  • Loading branch information
elias-sundqvist committed Nov 27, 2022
2 parents 5d42ef5 + 2e1cc2e commit f4e4014
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/annotatorView.tsx
Expand Up @@ -217,6 +217,7 @@ export default class AnnotatorView extends FileView {
const annotation = await getAnnotation(annotationId, this.file, this.app.vault);
if (!annotation) return;
let yoffset = -10000;
let done = false;
let newYOffset;
const isPageNote = !annotation.target?.length;
const selectors = new Set(isPageNote ? [] : annotation.target[0].selector.map(x => JSON.stringify(x)));
Expand Down Expand Up @@ -277,7 +278,6 @@ export default class AnnotatorView extends FileView {
'showAnnotations',
matchingAnchors.map(x => x.annotation.$tag)
);
let done = false;
switch (annotationTargetType) {
case 'pdf':
for (const anchor of matchingAnchors) {
Expand Down
4 changes: 2 additions & 2 deletions src/main.tsx
Expand Up @@ -389,8 +389,8 @@ 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.getAttribute("href"));
const annotationid = parsedLink.subpath.startsWith('#^') ? parsedLink.subpath.substring(2) : null;
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);

if (this.isAnnotationFile(file)) {
Expand Down

0 comments on commit f4e4014

Please sign in to comment.