vanakat / zotero-link

Obsidian plugin to insert link to Zotero item
MIT License
41 stars 5 forks source link

Title after colon is lost #9

Closed notuntoward closed 1 month ago

notuntoward commented 8 months ago

Whenever an article's contains a ':', nothing after the ':' makes it to the obsidian link's text.

For example, an article which in zotero has the title

Chronos: Learning the Language of Time Series

gets an obsidian link title

Chronos

I have my link title template set to

{{ title }}

MunGell commented 5 months ago

Hi @notuntoward

Unfortunately, I can't reproduce this issue on my setup.

Could you please share your Obsidian/Zotero versions and which OS you are running?

NikoOinonen commented 4 months ago

I'm also having this problem. And it's not just colons, a question mark (?) also cuts the rest of the title.

OS: Linux Mint 21.3 Zotero: 7.0.0-beta.98+0b3eda5d8 (64-bit) Obsidian: v1.6.5

notuntoward commented 4 months ago

I'm on:

Windows 11 Zotero 6.0.36 Obsidian 1.6.5

cjermain commented 3 months ago

I'm experiencing the same issue.

Linux Mint 20.3 Zotero 7.0.2 Obsidian 1.6.7

cjermain commented 3 months ago

I think this is an issue in zotero-bridge using the shortTitle instead of the title. For example, for the paper "Mamba: Linear-Time Sequence Modeling with Selective State Spaces" the short-title in Zotero is "Mamba". When I load it up in zotero-link, I only see "Mamba".

https://github.com/vanakat/zotero-bridge/blob/46f7766680496ed983db43dc25178755229c6427/src/ZoteroItem.ts#L25-L27

    getTitle() {
        return this.raw.shortTitle || this.raw.title || this.getNoteExcerpt() || '[No Title]';
    }

I would suggest adding getShortTitle() in zotero-bridge and adding {{ shortTitle }} to the template for zotero-link. I may put up a PR if I get time.

MunGell commented 1 month ago

Thanks to @cjermain for investigation and fix. It is merged now and I am planning to publish new version of the plugin today.

I would really appreciate if you could confirm if the problem is being resolved for you with the new version of the plugins.

MunGell commented 1 month ago

Should be fixed now in zotero-bridge version 1.6.3

cjermain commented 1 month ago

The new package works for me. Thanks!