summaryrefslogtreecommitdiff
path: root/pandoc-cs1
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2017-03-31 22:21:25 +0200
committerJonas Smedegaard <dr@jones.dk>2017-03-31 22:24:09 +0200
commit52002ce368502e7f8d1907f27022152abbe3b56a (patch)
tree2149888bedb4a903e022966230469959162b4ee9 /pandoc-cs1
parent5db61f2ea1725e87df08a5d5ec2d83aec4a8b8fe (diff)
Fix merge first+last into author.
Diffstat (limited to 'pandoc-cs1')
-rwxr-xr-xpandoc-cs16
1 files 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');