diff options
| -rw-r--r-- | lib/asciidoctor/parser.rb | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/asciidoctor/parser.rb b/lib/asciidoctor/parser.rb index 1ac090c9..c23fe9ea 100644 --- a/lib/asciidoctor/parser.rb +++ b/lib/asciidoctor/parser.rb @@ -1867,13 +1867,12 @@ class Parser if explicit # rebuild implicit author names to reparse authors.each_with_index do |author, idx| - unless author - authors[idx] = [ - author_metadata[%(firstname_#{name_idx = idx + 1})], - author_metadata[%(middlename_#{name_idx})], - author_metadata[%(lastname_#{name_idx})] - ].compact.map {|it| it.tr ' ', '_' }.join ' ' - end + next if author + authors[idx] = [ + author_metadata[%(firstname_#{name_idx = idx + 1})], + author_metadata[%(middlename_#{name_idx})], + author_metadata[%(lastname_#{name_idx})] + ].compact.map {|it| it.tr ' ', '_' }.join ' ' end if sparse # process as names only author_metadata = process_authors authors, true, false |
