Method: IsoDoc::Function::Section#preceding_floating_titles
- Defined in:
- lib/isodoc/function/section_titles.rb
#preceding_floating_titles(name, div) ⇒ Object
88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/isodoc/function/section_titles.rb', line 88 def preceding_floating_titles(name, div) return if name.nil? || name.is_a?(String) out = name.parent.xpath("./preceding-sibling::*") .reverse.each_with_object([]) do |p, m| break m unless p.name == "p" m << p end or return out.each { |c| parse(c, div) } end |