show pagenr in hover decoration
This commit is contained in:
parent
d9bc42d464
commit
ee8a1cc681
1 changed files with 2 additions and 1 deletions
|
@ -36,7 +36,8 @@ function updateDecorations() {
|
||||||
const uriArguments = `?${encodeURIComponent(JSON.stringify([reference]))}`;
|
const uriArguments = `?${encodeURIComponent(JSON.stringify([reference]))}`;
|
||||||
const pdfCommandUri = Uri.parse(`command:zoterolens.openZoteroPDF`+uriArguments);
|
const pdfCommandUri = Uri.parse(`command:zoterolens.openZoteroPDF`+uriArguments);
|
||||||
const viewCommandUri = Uri.parse(`command:zoterolens.showInZotero`+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.
|
// 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
|
// When creating trusted Markdown string, make sure to properly sanitize all the
|
||||||
|
|
Loading…
Reference in a new issue