add: api.convert.annotation2html new option ignoreBody
This commit is contained in:
parent
22d4e784be
commit
3482cda67f
|
|
@ -224,6 +224,7 @@ export async function parseAnnotationHTML(
|
|||
annotations: Zotero.Item[],
|
||||
options: {
|
||||
noteItem?: Zotero.Item; // If you are sure there are no image annotations, note is not required.
|
||||
ignoreBody?: boolean;
|
||||
ignoreComment?: boolean;
|
||||
skipCitation?: boolean;
|
||||
} = {},
|
||||
|
|
@ -234,6 +235,10 @@ export async function parseAnnotationHTML(
|
|||
if (options.ignoreComment && annotJson?.comment) {
|
||||
annotJson.comment = "";
|
||||
}
|
||||
if (options.ignoreBody && annotJson?.text && annotJson?.comment) {
|
||||
annotJson.text = annotJson.comment;
|
||||
annotJson.comment = "";
|
||||
}
|
||||
annotationJSONList.push(annotJson!);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue