Parse single tab-delimited creator

And fix logged error when adding empty creator with just whitespace
This commit is contained in:
Dan Stillman 2020-03-19 10:24:03 -04:00
parent c26ffedf9f
commit e6453b2088

View file

@ -1814,7 +1814,7 @@
var tabindex = textbox.getAttribute('ztabindex');
//var value = t.value;
var value = textbox.value;
var value = textbox.value.trim();
var elem;
var [field, creatorIndex, creatorField] = fieldName.split('-');
@ -1828,9 +1828,9 @@
otherFields[creatorField] = value;
var lastName = otherFields.lastName.trim();
//Handle \n\r and \n delimited entries
//Handle \n\r and \n delimited entries and a single line containing a tab
var rawNameArray = lastName.split(/\r\n?|\n/);
if (rawNameArray.length > 1) {
if (rawNameArray.length > 1 || rawNameArray[0].includes('\t')) {
//Save tab direction and add creator flags since they are reset in the
//process of adding multiple authors
var tabDirectionBuffer = this._tabDirection;