lib/asciidoctor/mpfa/section.rb in metanorma-mpfa-0.4.0 vs lib/asciidoctor/mpfa/section.rb in metanorma-mpfa-0.4.1
- old
+ new
@@ -10,11 +10,14 @@
super
x.xpath("//*[@inline-header]").each do |h|
h.delete("inline-header")
end
x.xpath("//*[@guidance]").each do |h|
- c = h.previous_element || next
- c.add_child h.remove
+ #c = h.at("./preceding-sibling::clause[last()]") || next
+ c = h.xpath("./preceding-sibling::clause")
+ c.empty? and next
+ #c.add_child h.remove
+ c.last.add_child h.remove
end
end
def sectiontype_streamline(ret)
case ret