update at 2025-10-16 14:03:45

This commit is contained in:
douboer
2025-10-16 14:03:45 +08:00
parent b9feb2f764
commit 93afc99e7d
14 changed files with 78 additions and 72 deletions

View File

@@ -200,7 +200,7 @@ export class ArticleRender implements MDRendererCallback {
errorContent(error: any) {
return '<h1>渲染失败!</h1><br/>'
+ '如需帮助请前往&nbsp;&nbsp;<a href="https://github.com/sunbooshi/note-to-mp/issues">https://github.com/sunbooshi/note-to-mp/issues</a>&nbsp;&nbsp;反馈<br/><br/>'
+ '如需帮助请前往&nbsp;&nbsp;<a href="https://github.com/sunbooshi/note2any/issues">https://github.com/sunbooshi/note2any/issues</a>&nbsp;&nbsp;反馈<br/><br/>'
+ '如果方便请提供引发错误的完整Markdown内容。<br/><br/>'
+ '<br/>Obsidian版本' + apiVersion
+ '<br/>错误信息:<br/>'
@@ -341,11 +341,11 @@ export class ArticleRender implements MDRendererCallback {
try {
const globalAny = window as any;
const now = Date.now();
if (!globalAny.__note2mp_lastPathLog ||
globalAny.__note2mp_lastPathLog.path !== file.path ||
now - globalAny.__note2mp_lastPathLog.time > 3000) {
console.log('[note2mp] active file path:', file.path);
globalAny.__note2mp_lastPathLog = { path: file.path, time: now };
if (!globalAny.__note2any_lastPathLog ||
globalAny.__note2any_lastPathLog.path !== file.path ||
now - globalAny.__note2any_lastPathLog.time > 3000) {
console.log('[note2any] active file path:', file.path);
globalAny.__note2any_lastPathLog = { path: file.path, time: now };
}
} catch {}
const metadata = this.app.metadataCache.getFileCache(file);
@@ -475,7 +475,7 @@ export class ArticleRender implements MDRendererCallback {
if (base) res.cover = `![[${base}]]`;
}
if (res.cover) {
try { console.log('[note2mp] use default cover:', def, '->', res.cover); } catch {}
try { console.log('[note2any] use default cover:', def, '->', res.cover); } catch {}
}
}
}