lib/citeproc/ruby/renderer/text.rb in citeproc-ruby-1.0.0 vs lib/citeproc/ruby/renderer/text.rb in citeproc-ruby-1.0.1

- old
+ new

@@ -20,13 +20,13 @@ else text = item.data.variable(node.variable, node.variable_options).to_s # Check for abbreviations or short-form fallbacks! - context, was_short_form = node.variable.split(/-short/, 2) + context, was_short_form = node.variable.split(/-short$/, 2) - if was_short_form || node[:form] == 'short' - if text.empty? + if !was_short_form.nil? || node[:form] == 'short' + if text.empty? && context != node.variable text = item.data.variable(context, node.variable_options).to_s end text = abbreviate(context, text) || text end