spec/isodoc/table_spec.rb in isodoc-1.0.20 vs spec/isodoc/table_spec.rb in isodoc-1.0.21

- old
+ new

@@ -4,12 +4,12 @@ it "processes IsoXML tables" do expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT") <iso-standard xmlns="http://riboseinc.com/isoxml"> <preface> <foreword> - <table id="tableD-1" alt="tool tip" summary="long desc"> - <name>Repeatability and reproducibility of <em>husked</em> rice yield</name> + <table id="tableD-1" alt="tool tip" summary="long desc" width="70%"> + <name>Repeatability and reproducibility of <em>husked</em> rice yield<fn reference="1"><p>X</p></fn></name> <thead> <tr> <td rowspan="2" align="left">Description</td> <td colspan="4" align="center">Rice sample</td> </tr> @@ -65,12 +65,16 @@ INPUT #{HTML_HDR} <br/> <div> <h1 class="ForewordTitle">Foreword</h1> - <p class="TableTitle" style="text-align:center;">Table 1&#160;&#8212; Repeatability and reproducibility of <i>husked</i> rice yield</p> - <table id="tableD-1" class="MsoISOTable" style="border-width:1px;border-spacing:0;" title="tool tip"> + <p class="TableTitle" style="text-align:center;">Table 1&#160;&#8212; Repeatability and reproducibility of <i>husked</i> rice yield + <a rel='footnote' href='#fn:1' epub:type='footnote'> + <sup>1</sup> +</a> + </p> + <table id="tableD-1" class="MsoISOTable" style="border-width:1px;border-spacing:0;width:70%;" title="tool tip"> <caption> <span style="display:none">long desc</span> </caption> <thead> <tr> @@ -128,26 +132,29 @@ </tr> </tbody> </table> </div> <p class="zzSTDTitle1"/> + <aside id='fn:1' class='footnote'> + <p>X</p> + </aside> </div> </body> </html> OUTPUT end it "processes IsoXML tables (Word)" do - expect(xmlpp(IsoDoc::WordConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT") + expect(xmlpp(IsoDoc::WordConvert.new({}).convert("test", <<~"INPUT", true).gsub(/mso-bookmark:_Ref\d+/, "mso-bookmark:_Ref"))).to be_equivalent_to xmlpp(<<~"OUTPUT") <iso-standard xmlns="http://riboseinc.com/isoxml"> <preface> <foreword> <table id="tableD-0"> <tbody><tr><td>A</td></tr></tbody> </table> - <table id="tableD-1" alt="tool tip" summary="long desc"> - <name>Repeatability and reproducibility of husked rice yield</name> + <table id="tableD-1" alt="tool tip" summary="long desc" width="70%"> + <name>Repeatability and reproducibility of husked rice yield<fn reference="1"><p>X</p></fn></name> <thead> <tr> <td rowspan="2" align="left">Description</td> <td colspan="4" align="center">Rice sample</td> </tr> @@ -216,13 +223,19 @@ <td style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">A</td> </tr> </tbody> </table> </div> - <p class="TableTitle" style="text-align:center;">Table 2&#160;&#8212; Repeatability and reproducibility of husked rice yield</p> + <p class="TableTitle" style="text-align:center;">Table 2&#160;&#8212; Repeatability and reproducibility of husked rice yield + <span style='mso-bookmark:_Ref'> + <a href='#ftn1' epub:type='footnote'> + <sup>1</sup> + </a> + </span> + </p> <div align="center" class="table_container"> - <table id="tableD-1" class="MsoISOTable" style="mso-table-lspace:15.0cm;margin-left:423.0pt;mso-table-rspace:15.0cm;margin-right:423.0pt;mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;" title="tool tip" summary="long desc"> + <table id="tableD-1" class="MsoISOTable" style="mso-table-lspace:15.0cm;margin-left:423.0pt;mso-table-rspace:15.0cm;margin-right:423.0pt;mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;" title="tool tip" summary="long desc" width="70%"> <thead> <tr> <td rowspan="2" align="left" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">Description</td> <td colspan="4" align="center" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;">Rice sample</td> </tr> @@ -277,9 +290,12 @@ <p>&#160;</p> </div> <p><br clear="all" class="section"/></p> <div class="WordSection3"> <p class="zzSTDTitle1"/> + <aside id='ftn1'> + <p>X</p> +</aside> </div> </body> </html> OUTPUT end