spec/isodoc/table_spec.rb in isodoc-0.5.8 vs spec/isodoc/table_spec.rb in isodoc-0.5.9
- old
+ new
@@ -2,10 +2,11 @@
RSpec.describe IsoDoc do
it "processes IsoXML tables" do
expect(IsoDoc::Convert.new({}).convert_file(<<~"INPUT", "test", true)).to be_equivalent_to <<~"OUTPUT"
<iso-standard xmlns="http://riboseinc.com/isoxml">
+ <preface>
<foreword>
<table id="tableD-1">
<name>Repeatability and reproducibility of husked rice yield</name>
<thead>
<tr>
@@ -53,10 +54,11 @@
<dd>A type of rice</dd>
</dl>
<note><p>This is a table about rice</p></note>
</table>
</foreword>
+</preface>
</iso-standard>
INPUT
<html xmlns:epub="http://www.idpf.org/2007/ops">
<head>
<title>test</title>
@@ -68,21 +70,21 @@
<div class="WordSection2">
<br/>
<div>
<h1 class="ForewordTitle">Foreword</h1>
<p class="TableTitle" align="center">
- <b>Table 1 — Repeatability and reproducibility of husked rice yield</b>
+ Table 1 — Repeatability and reproducibility of husked rice yield
</p>
<table id="tableD-1" class="MsoISOTable" border="1" cellspacing="0" cellpadding="0">
<thead>
<tr>
<td rowspan="2" align="left" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">Description</td>
<td colspan="4" align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;">Rice sample</td>
</tr>
<tr>
<td align="left" style="border-top:none;border-bottom:solid windowtext 1.5pt;">Arborio</td>
- <td align="center" style="border-top:none;border-bottom:solid windowtext 1.5pt;">Drago<a href="#tableD-1a" class="TableFootnoteRef">a</a><aside><div id="ftntableD-1a"><a id="tableD-1a" class="TableFootnoteRef">a  </a>
+ <td align="center" style="border-top:none;border-bottom:solid windowtext 1.5pt;">Drago<a href="#tableD-1a" class="TableFootnoteRef">a</a><aside class="footnote"><div id="ftntableD-1a"><a id="tableD-1a" class="TableFootnoteRef">a  </a>
<p id="_0fe65e9a-5531-408e-8295-eeff35f41a55">Parboiled rice.</p>
</div></aside></td>
<td align="center" style="border-top:none;border-bottom:solid windowtext 1.5pt;">Balilla<a href="#tableD-1a" class="TableFootnoteRef">a</a></td>
<td align="center" style="border-top:none;border-bottom:solid windowtext 1.5pt;">Thaibonnet</td>
</tr>
@@ -117,11 +119,11 @@
<p>Drago</p>
</dt>
<dd>A type of rice</dd>
</dl>
<div id="" class="Note">
- <p class="Note">NOTE  This is a table about rice</p>
+ <p class="Note"><span class="note_label">NOTE</span>  This is a table about rice</p>
</div>
</table>
</div>
<p> </p>
</div>
@@ -136,10 +138,11 @@
end
it "processes IsoXML tables (Word)" do
expect(IsoDoc::WordConvert.new({}).convert_file(<<~"INPUT", "test", true)).to be_equivalent_to <<~"OUTPUT"
<iso-standard xmlns="http://riboseinc.com/isoxml">
+ <preface>
<foreword>
<table id="tableD-1">
<name>Repeatability and reproducibility of husked rice yield</name>
<thead>
<tr>
@@ -187,13 +190,14 @@
<dd>A type of rice</dd>
</dl>
<note><p>This is a table about rice</p></note>
</table>
</foreword>
+</preface>
</iso-standard>
INPUT
- <html xmlns:epub="http://www.idpf.org/2007/ops">
+ <html xmlns:epub="http://www.idpf.org/2007/ops">
<head>
<title>test</title>
<body lang="EN-US" link="blue" vlink="#954F72">
<div class="WordSection1">
<p> </p>
@@ -201,13 +205,11 @@
<br clear="all" class="section"/>
<div class="WordSection2">
<br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
<div>
<h1 class="ForewordTitle">Foreword</h1>
- <p class="TableTitle" align="center">
- <b>Table 1 — Repeatability and reproducibility of husked rice yield</b>
- </p>
+ <p class="TableTitle" align="center">Table 1 — Repeatability and reproducibility of husked rice yield</p>
<table id="tableD-1" class="MsoISOTable" border="1" cellspacing="0" cellpadding="0">
<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>
@@ -215,11 +217,11 @@
<tr>
<td align="left" style="border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">Arborio</td>
<td align="center" style="border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">Drago<a href="#tableD-1a" class="TableFootnoteRef">a</a><aside><div id="ftntableD-1a"><a id="tableD-1a" class="TableFootnoteRef">a<span style="mso-tab-count:1">  </span></a>
<p id="_0fe65e9a-5531-408e-8295-eeff35f41a55">Parboiled rice.</p>
</div></aside></td>
- <td align="center" style="border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">Balilla<a href="#tableD-1a" class="TableFootnoteRef">a</a></td>
+ <td align="center" style="border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">Balilla<a href="#tableD-1a" class="TableFootnoteRef">a</a></td>
<td align="center" style="border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">Thaibonnet</td>
</tr>
</thead>
<tbody>
<tr>
@@ -245,18 +247,18 @@
<td align="center" 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;">2,26</td>
<td align="center" 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;">6,06</td>
</tr>
</tfoot>
<table class="dl">
- <tr>
- <td valign="top" align="left">
- <p style="text-align: left;">Drago</p>
- </td>
- <td valign="top">A type of rice</td>
- </tr>
-</table>
+ <tr>
+ <td valign="top" align="left">
+ <p align="left" style="margin-left:0pt;text-align:left;">Drago</p>
+ </td>
+ <td valign="top">A type of rice</td>
+ </tr>
+ </table>
<div id="" class="Note">
- <p class="Note">NOTE<span style="mso-tab-count:1">  </span>This is a table about rice</p>
+ <p class="Note"><span class="note_label">NOTE</span><span style="mso-tab-count:1">  </span>This is a table about rice</p>
</div>
</table>
</div>
<p> </p>
</div>