diff --git a/src/decorations.ts b/src/decorations.ts index 33e2d02..36aa7f9 100644 --- a/src/decorations.ts +++ b/src/decorations.ts @@ -36,7 +36,8 @@ function updateDecorations() { const uriArguments = `?${encodeURIComponent(JSON.stringify([reference]))}`; const pdfCommandUri = Uri.parse(`command:zoterolens.openZoteroPDF`+uriArguments); const viewCommandUri = Uri.parse(`command:zoterolens.showInZotero`+uriArguments); - const contents = new MarkdownString(`${reference.citekey}\n\n[View in Zotero](${viewCommandUri}) | [Open PDF](${pdfCommandUri})`); + const pageNr = reference.pagenr === null ? "" : `(${reference.pagenr})`; + const contents = new MarkdownString(`${reference.citekey} ${pageNr}\n\n[View in Zotero](${viewCommandUri}) | [Open PDF](${pdfCommandUri})`); // To enable command URIs in Markdown content, you must set the `isTrusted` flag. // When creating trusted Markdown string, make sure to properly sanitize all the