mirror of
https://github.com/lllin000/PaperForge.git
synced 2026-07-22 17:00:23 +00:00
fix(dashboard): use same wikilink parser as Open PDF button for PDF detection
This commit is contained in:
parent
a11e62c6aa
commit
d768f5bcb0
1 changed files with 3 additions and 2 deletions
|
|
@ -1149,8 +1149,9 @@ class PaperForgeStatusView extends ItemView {
|
|||
if (ext === 'pdf') {
|
||||
const items = this._getCachedIndex();
|
||||
for (const item of items) {
|
||||
const pdfPath = (item.pdf_path || '').replace(/^\[\[|\]\]$/g, '').trim();
|
||||
if (pdfPath === filePath) {
|
||||
const pathMatch = (item.pdf_path || '').match(/\[\[([^\]]+)\]\]/);
|
||||
const targetPath = pathMatch ? pathMatch[1] : item.pdf_path;
|
||||
if (targetPath === filePath) {
|
||||
return { mode: 'paper', filePath, key: item.zotero_key, domain: null };
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue