lib/citeproc/ruby/renderer/names.rb in citeproc-ruby-1.1.2 vs lib/citeproc/ruby/renderer/names.rb in citeproc-ruby-1.1.3
- old
+ new
@@ -11,15 +11,12 @@
names = node.variable.split(/\s+/).map do |role|
[role.to_sym, item.data[role]]
end
- names.reject! { |n| n[1].nil? || n[1].empty? }
+ suppressed = names.reject! { |n| item.suppressed? n[0] }
- # Filter out suppressed names only now, because
- # we are not interested in suppressed variables
- # which are empty anyway!
- suppressed = names.reject! { |n| item.suppressed? n }
+ names.reject! { |n| n[1].nil? || n[1].empty? }
if names.empty?
# We also return when the list is empty because
# of a suppression, because we do not want to
# substitute suppressed items!