Don't extract 'type: note' or 'type: attachment' from Extra

This commit is contained in:
Dan Stillman 2020-03-17 13:50:45 -04:00
parent 3247391914
commit 3f2998bb6b
2 changed files with 12 additions and 0 deletions

View file

@ -114,6 +114,13 @@ describe("Zotero.Utilities.Internal", function () {
describe("#extractExtraFields()", function () {
it("should ignore 'type: note' and 'type: attachment'", function () {
var str = 'type: note';
var { itemType, extra } = Zotero.Utilities.Internal.extractExtraFields(str);
assert.isNull(itemType);
assert.equal(extra, 'type: note');
});
it("should extract a CSL type", function () {
var str = 'type: motion_picture';
var { itemType, fields, extra } = Zotero.Utilities.Internal.extractExtraFields(str);