lib/isodoc/function/cleanup.rb in isodoc-1.0.5 vs lib/isodoc/function/cleanup.rb in isodoc-1.0.6

- old
+ new

@@ -41,11 +41,11 @@ "[not(descendant::div[@class = 'figure'])]".freeze def figure_aside_process(f, aside, key) # get rid of footnote link, it is in diagram f&.at("./a[@class='TableFootnoteRef']")&.remove - fnref = f.at(".//a[@class='TableFootnoteRef']") + fnref = f.at(".//span[@class='TableFootnoteRef']/..") dt = key.add_child("<dt></dt>").first dd = key.add_child("<dd></dd>").first fnref.parent = dt aside.xpath(".//p").each do |a| a.delete("class") @@ -84,10 +84,10 @@ end docxml end def merge_fnref_into_fn_text(a) - fn = a.at('.//a[@class="TableFootnoteRef"]') + fn = a.at('.//span[@class="TableFootnoteRef"]/..') n = fn.next_element n&.children&.first&.add_previous_sibling(fn.remove) end def table_footnote_cleanup(docxml)