From 52002ce368502e7f8d1907f27022152abbe3b56a Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Fri, 31 Mar 2017 22:21:25 +0200 Subject: Fix merge first+last into author. --- pandoc-cs1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandoc-cs1 b/pandoc-cs1 index 2cfc81a..81d787a 100755 --- a/pandoc-cs1 +++ b/pandoc-cs1 @@ -40,11 +40,11 @@ pandoc_filter sub { for ( my $i = 1;; $i++ ) { my ( $first, $last ); if ( $i == 1 and $bibdata->get('first') ) { - $first = $bibdata->get("first$i"); - $bibdata->delete("first$i"); - } elsif ( $bibdata->get("first$i") ) { $first = $bibdata->get('first'); $bibdata->delete('first'); + } elsif ( $bibdata->get("first$i") ) { + $first = $bibdata->get("first$i"); + $bibdata->delete("first$i"); } if ( $i == 1 and $bibdata->get('last') ) { $last = $bibdata->get('last'); -- cgit v1.2.3