atom-latextools
atom-latextools copied to clipboard
authors_short doesn't work as expected
authors_short
is replaced with comma-separated list of surnames not with the expected format <first name> et al.
After a lot of debugging I found out why that is the case.
The command authors = [a.split(", ")[0].trim() for a in authors.split(" and ")]
results in an array with one child element that contains the array with the author names. Therefore the length of the first array is always 1, which means that 'et al.' is never appended. Since the authors
variable is an array containing an array, the join command in the else
clause doesn't do what is expected either.
After adding authors = authors[0]
directly after the previously shown command, the behaviour is as expected.