Method: IsoDoc::WordFunction::Postprocess#word_sourcecode_annotations

Defined in:
lib/isodoc/word_function/postprocess.rb

#word_sourcecode_annotations(html) ⇒ Object



76
77
78
79
80
81
82
83
84
85
# File 'lib/isodoc/word_function/postprocess.rb', line 76

def word_sourcecode_annotations(html)
  ann = ".//div[@class = 'annotation']"
  html.xpath("//p[@class = '#{sourcecode_style}'][#{ann}]")
    .each do |p|
    ins = p.after("<p class='#{sourcecode_style}'/>").next_element
    p.xpath(ann).each do |d|
      ins << d.remove.children
    end
  end
end