diff --git a/apps/server/src/share/content_renderer.ts b/apps/server/src/share/content_renderer.ts index dc9fac8ce..254829114 100644 --- a/apps/server/src/share/content_renderer.ts +++ b/apps/server/src/share/content_renderer.ts @@ -393,17 +393,16 @@ function handleAttachmentLink(linkEl: HTMLElement, href: string, getNote: (id: s * @param linkEl the element to process. */ function cleanUpReferenceLinks(linkEl: HTMLElement) { + // Note: this method is basically a reimplementation of getReferenceLinkTitleSync from the link service of the client. const noteId = linkEl.getAttribute("href")?.split("/").at(-1); const note = noteId ? shaca.getNote(noteId) : undefined; - let text = ""; if (!note) { - text = "[missing note]"; + linkEl.innerHTML = "[missing note]"; } else if (note.isProtected) { - text = "[protected]"; + linkEl.innerHTML = "[protected]"; } else { - text = note.title; + linkEl.innerHTML = `${note.title}`; } - linkEl.innerHTML = text; } /** diff --git a/packages/share-theme/src/styles/content.css b/packages/share-theme/src/styles/content.css index 0749e7d09..0f7a6430c 100644 --- a/packages/share-theme/src/styles/content.css +++ b/packages/share-theme/src/styles/content.css @@ -50,6 +50,10 @@ height: auto; } +a.reference-link > span > .bx { + margin-inline-end: 3px; +} + body:not(.math-loaded) .math-tex { visibility: hidden; }