Skip to content

Commit

Permalink
Use closest delimiter when rendering choose nodes
Browse files Browse the repository at this point in the history
Closes #83
  • Loading branch information
inukshuk committed Sep 1, 2024
1 parent 6680d32 commit 4c43700
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/citeproc/ruby/renderer/choose.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@ def render_block(item, node)

join node.each_child.map { |child|
render item, child
}
}, closest_delimiter_for(node)
end

def closest_delimiter_for(node)
node.closest(/^group|layout$/)&.delimiter || ''
end

# Evaluates the conditions of the passed-in Choose::Block
# against the passed-in CitationItem using the Block's matcher.
Expand Down Expand Up @@ -101,6 +104,5 @@ def evaluates_condition?(matcher, values, &condition)
end
end
end

end
end

0 comments on commit 4c43700

Please sign in to comment.