diff --git a/src/modules/annotationsToNote.ts b/src/modules/annotationsToNote.ts index 3ac9cf3a..50054f00 100644 --- a/src/modules/annotationsToNote.ts +++ b/src/modules/annotationsToNote.ts @@ -75,7 +75,7 @@ function unregister() { } async function saveNote(targetNoteItem: Zotero.Item, txt: string) { - await Zotero.BetterNotes.api.note.insert(targetNoteItem, txt, -1); + await Zotero.BetterNotes.api.note.insert(targetNoteItem, txt, -1); // const editor= await Zotero.BetterNotes.api.editor.getEditorInstance(targetNoteItem.id) // await Zotero.BetterNotes.api.editor.replace(editor,0,1e3,txt) await targetNoteItem.saveTx(); @@ -261,7 +261,7 @@ async function exportNote({ const title = getTitleFromAnnotations(annotations); //createNote 一定要在 getSelectedItems 之后,不然获取不到选择的条目 // 另一个问题是 会创建顶层条目触发另一个插件的 closeOtherProgressWindows - const note = await createNote(title); + const note = await createNote(title); annotations = await convertHtml(annotations, note); const getKeyGroup = (fn: (item: AnnotationRes) => string | number | symbol) => groupBy(annotations, fn) @@ -318,7 +318,7 @@ function exportNoteOnlyImage(isCollection: boolean = false) { exportNote({ toText: (annotations) => groupBy(annotations, (a) => a.pdfTitle) - .flatMap((pdfTitle, index,aa) => [ + .flatMap((pdfTitle, index, aa) => [ `

(${index + 1}/${aa.length}) ${pdfTitle.key} ${getCiteItemHtml(pdfTitle.values[0]?.item)} (${pdfTitle.values.length})

`, ...pdfTitle.values.flatMap((b) => [ b.html @@ -342,7 +342,7 @@ function exportNoteScale(isCollection: boolean = false) { toText: (ans) => groupBy(ans, (a) => a.pdfTitle) .sort((a, b) => (a.key > b.key ? 1 : -1)) - .flatMap((a, index,aa) => [ + .flatMap((a, index, aa) => [ `

(${index + 1}/${aa.length}) ${a.key} ${getCiteItemHtmlWithPage(a.values[0].ann)}

`, a.values .map((b) => `

${getCiteAnnotationHtml(b.ann)}

`)