isodoc 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 964f8f6c290c6f45bc7c21a4359426f86fe3237eeb993ec6a4145f323d21603d
4
- data.tar.gz: 0bdf3ebd2dbb22e66a8eb5025916485da601d20c671eb36a825085318f4f0b97
3
+ metadata.gz: 79d66a49cb5bec7550c58e49fb9a278281d4f74ee4f49f92710ebeed8f2dab95
4
+ data.tar.gz: 2b7f2d96af993dc95c62b84f38f755c756eb060741428a8d76ab6ed2739dedfc
5
5
  SHA512:
6
- metadata.gz: b5140c733c1d356934a84f645d3f44407208c20162ab5c71c62ed93adc5311f9364a051f460c1bef88896c195955b1b5a4d56fe8d5129a38343902365bf7961b
7
- data.tar.gz: 4ea58c0144a66ef9a473f95711f67a35317f070140e20d564577d8c4c5ade4d421445cce46e1009b47d8d842647e6220762af670fb25c3838161b3defb0e8d51
6
+ metadata.gz: 3caa283c8fcda23c1d8203666ebe8c259491338b893343cf113de6ba2f05afe965ca774214ea97451b3542438b645c4dd74ec98b43584673f1ad8a11d4120614
7
+ data.tar.gz: '05924a7a7e0d532cc862718102c76f03a13f1cbf6e34fa4d9a3590da3553949a603df6d8db1a7a4aa736ec730055855686c12e48dd63a38b2b62312daa95bf68'
@@ -25,7 +25,7 @@ jobs:
25
25
  - name: Use Node
26
26
  uses: actions/setup-node@v1
27
27
  with:
28
- node-version: '8'
28
+ node-version: '10'
29
29
  - name: Install Puppeteer
30
30
  run: |
31
31
  npm install -g puppeteer
@@ -25,7 +25,7 @@ jobs:
25
25
  - name: Use Node
26
26
  uses: actions/setup-node@v1
27
27
  with:
28
- node-version: '8'
28
+ node-version: '10'
29
29
  - name: Install Puppeteer
30
30
  run: |
31
31
  npm install -g puppeteer
@@ -28,7 +28,7 @@ jobs:
28
28
  - name: Use Node
29
29
  uses: actions/setup-node@v1
30
30
  with:
31
- node-version: '8'
31
+ node-version: '10'
32
32
  - name: Install Puppeteer
33
33
  run: |
34
34
  npm install -g puppeteer
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- isodoc (1.0.5)
4
+ isodoc (1.0.6)
5
5
  asciimath
6
- html2doc (~> 0.8.11)
6
+ html2doc (~> 0.9.0)
7
7
  htmlentities (~> 4.3.4)
8
8
  liquid
9
9
  metanorma (~> 0.3.0)
@@ -18,7 +18,7 @@ GEM
18
18
  remote: https://rubygems.org/
19
19
  specs:
20
20
  asciidoctor (2.0.10)
21
- asciimath (1.0.8)
21
+ asciimath (1.0.9)
22
22
  ast (2.4.0)
23
23
  byebug (9.1.0)
24
24
  coderay (1.1.2)
@@ -42,8 +42,8 @@ GEM
42
42
  guard (~> 2.1)
43
43
  guard-compat (~> 1.1)
44
44
  rspec (>= 2.99.0, < 4.0)
45
- html2doc (0.8.14)
46
- asciimath (~> 1.0.7)
45
+ html2doc (0.9.0)
46
+ asciimath (~> 1.0.9)
47
47
  htmlentities (~> 4.3.4)
48
48
  image_size
49
49
  mime-types
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
33
33
  spec.add_dependency "nokogiri", ">= 1.10.4"
34
34
  spec.add_dependency "thread_safe"
35
35
  spec.add_dependency "uuidtools"
36
- spec.add_dependency "html2doc", "~> 0.8.11"
36
+ spec.add_dependency "html2doc", "~> 0.9.0"
37
37
  spec.add_dependency "liquid"
38
38
  spec.add_dependency "roman-numerals"
39
39
  spec.add_dependency "sassc", "~> 2.2.1"
@@ -139,8 +139,8 @@ module IsoDoc::Function
139
139
  parse(n, div) unless n.name == "name"
140
140
  end
141
141
  @sourcecode = false
142
- sourcecode_name_parse(node, div, name) if name
143
142
  end
143
+ sourcecode_name_parse(node, out, name) if name
144
144
  end
145
145
 
146
146
  def pre_parse(node, out)
@@ -43,7 +43,7 @@ module IsoDoc::Function
43
43
  def figure_aside_process(f, aside, key)
44
44
  # get rid of footnote link, it is in diagram
45
45
  f&.at("./a[@class='TableFootnoteRef']")&.remove
46
- fnref = f.at(".//a[@class='TableFootnoteRef']")
46
+ fnref = f.at(".//span[@class='TableFootnoteRef']/..")
47
47
  dt = key.add_child("<dt></dt>").first
48
48
  dd = key.add_child("<dd></dd>").first
49
49
  fnref.parent = dt
@@ -86,7 +86,7 @@ module IsoDoc::Function
86
86
  end
87
87
 
88
88
  def merge_fnref_into_fn_text(a)
89
- fn = a.at('.//a[@class="TableFootnoteRef"]')
89
+ fn = a.at('.//span[@class="TableFootnoteRef"]/..')
90
90
  n = fn.next_element
91
91
  n&.children&.first&.add_previous_sibling(fn.remove)
92
92
  end
@@ -48,7 +48,7 @@ module IsoDoc::Function
48
48
  div.h1 **attr_code(header_class) do |h1|
49
49
  if num && !@suppressheadingnumbers
50
50
  h1 << "#{num}#{clausedelim}"
51
- insert_tab(h1, 1)
51
+ clausedelimspace(h1)
52
52
  end
53
53
  h1 << title
54
54
  end
@@ -102,7 +102,7 @@ module IsoDoc::Function
102
102
  def annex_names(clause, num)
103
103
  @anchors[clause["id"]] = { label: annex_name_lbl(clause, num), type: "clause",
104
104
  xref: "#{@annex_lbl} #{num}", level: 1 }
105
- clause.xpath(ns("./clause | ./references")).each_with_index do |c, i|
105
+ clause.xpath(ns("./clause | ./references | ./term | ./terms | ./definitions")).each_with_index do |c, i|
106
106
  annex_names1(c, "#{num}.#{i + 1}", 2)
107
107
  end
108
108
  hierarchical_asset_names(clause, num)
@@ -111,7 +111,7 @@ module IsoDoc::Function
111
111
  def annex_names1(clause, num, level)
112
112
  @anchors[clause["id"]] = { label: num, xref: "#{@annex_lbl} #{num}",
113
113
  level: level, type: "clause" }
114
- clause.xpath(ns("./clause | ./references")).each_with_index do |c, i|
114
+ clause.xpath(ns("./clause | ./references | ./term | ./terms | ./definitions")).each_with_index do |c, i|
115
115
  annex_names1(c, "#{num}.#{i + 1}", level + 1)
116
116
  end
117
117
  end
@@ -15,9 +15,11 @@ module IsoDoc::HtmlFunction
15
15
 
16
16
  def make_table_footnote_target(out, fnid, fnref)
17
17
  attrs = { id: fnid, class: "TableFootnoteRef" }
18
- out.a **attrs do |a|
19
- a << fnref
20
- insert_tab(a, 1)
18
+ out.span do |s|
19
+ out.span **attrs do |a|
20
+ a << fnref
21
+ end
22
+ insert_tab(s, 1)
21
23
  end
22
24
  end
23
25
 
@@ -1,3 +1,3 @@
1
1
  module IsoDoc
2
- VERSION = "1.0.5".freeze
2
+ VERSION = "1.0.6".freeze
3
3
  end
@@ -153,7 +153,7 @@ module IsoDoc::WordFunction
153
153
  def figure_aside_process(f, aside, key)
154
154
  # get rid of footnote link, it is in diagram
155
155
  f&.at("./a[@class='TableFootnoteRef']")&.remove
156
- fnref = f.at(".//a[@class='TableFootnoteRef']")
156
+ fnref = f.at(".//span[@class='TableFootnoteRef']/..")
157
157
  tr = key.add_child("<tr></tr>").first
158
158
  dt = tr.add_child("<td valign='top' align='left'></td>").first
159
159
  dd = tr.add_child("<td valign='top'></td>").first
@@ -15,9 +15,11 @@ module IsoDoc::WordFunction
15
15
 
16
16
  def make_table_footnote_target(out, fnid, fnref)
17
17
  attrs = { id: fnid, class: "TableFootnoteRef" }
18
- out.a **attrs do |a|
19
- a << fnref
20
- insert_tab(a, 1)
18
+ out.span do |s|
19
+ out.span **attrs do |a|
20
+ a << fnref
21
+ end
22
+ insert_tab(s, 1)
21
23
  end
22
24
  end
23
25
 
@@ -65,12 +65,14 @@ xmlns:m="http://schemas.microsoft.com/office/2004/12/omml">
65
65
  end
66
66
 
67
67
  def word_image_caption(docxml)
68
- docxml.xpath("//p[@class = 'FigureTitle']").each do |t|
68
+ docxml.xpath("//p[@class = 'FigureTitle' or @class = 'SourceTitle']").each do |t|
69
69
  if t.previous_element.name == "img"
70
70
  img = t.previous_element
71
- t.previous_element.swap("<p>#{img.to_xml}</p>")
71
+ t.previous_element.swap("<p class=\'figure\'>#{img.to_xml}</p>")
72
72
  end
73
- t.previous_element["style"] = t["style"].sub(/;?$/, ";page-break-after:avoid;")
73
+ t.previous_element["style"] = t.previous_element["style"] ?
74
+ t.previous_element["style"].sub(/;?$/, ";page-break-after:avoid;") :
75
+ "page-break-after:avoid;"
74
76
  end
75
77
  end
76
78
 
@@ -259,7 +259,7 @@ B</pre>
259
259
  <img src="rice_images/rice_image1.png" height="20" width="30" alt="alttext" title="titletxt"/>
260
260
  <img src="rice_images/rice_image1.png" height="20" width="auto"/>
261
261
  <img src="data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/XBs/fNwfjZ0frl3/zy7////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAABAALAAAAAAQABAAAAVVICSOZGlCQAosJ6mu7fiyZeKqNKToQGDsM8hBADgUXoGAiqhSvp5QAnQKGIgUhwFUYLCVDFCrKUE1lBavAViFIDlTImbKC5Gm2hB0SlBCBMQiB0UjIQA7" height="20" width="auto"/>
262
- <a href="#_" class="TableFootnoteRef">a</a><aside class="footnote"><div id="fn:_"><a id="_" class="TableFootnoteRef">a&#160; </a>
262
+ <a href="#_" class="TableFootnoteRef">a</a><aside class="footnote"><div id="fn:_"><span><span id="_" class="TableFootnoteRef">a</span>&#160; </span>
263
263
  <p id="_">The time <span class="stem">(#(t_90)#)</span> was estimated to be 18,2 min for this example.</p>
264
264
  </div></aside>
265
265
  <p><b>Key</b></p><dl><dt><p>A</p></dt><dd><p>B</p></dd></dl>
@@ -322,7 +322,7 @@ B</pre>
322
322
  <img src="rice_images/rice_image1.png" height="20" width="30" alt="alttext" title="titletext"/>
323
323
  <img src="rice_images/rice_image1.png"/>
324
324
  <img src="test_images/_.gif"/>
325
- <a href="#_" class="TableFootnoteRef">a</a><aside><div id="ftn_"><a id="_" class="TableFootnoteRef">a<span style="mso-tab-count:1">&#160; </span></a>
325
+ <a href="#_" class="TableFootnoteRef">a</a><aside><div id="ftn_"><span><span id="_" class="TableFootnoteRef">a</span><span style="mso-tab-count:1">&#160; </span></span>
326
326
  <p id="_">The time <span class="stem">(#(t_90)#)</span> was estimated to be 18,2 min for this example.</p>
327
327
  </div></aside>
328
328
  <p><b>Key</b></p><table class="dl"><tr><td valign="top" align="left"><p align="left" style="margin-left:0pt;text-align:left;">A</p></td><td valign="top"><p>B</p></td></tr></table>
@@ -463,7 +463,7 @@ B</pre>
463
463
  </p>
464
464
  <div>
465
465
  <h1 class="ForewordTitle">Foreword</h1>
466
- <p id="samplecode" class="Sourcecode"><br/>&#160;&#160;&#160; <br/>&#160; puts x<br/><p class="SourceTitle" style="text-align:center;">Ruby <i>code</i></p></p>
466
+ <p id="samplecode" class="Sourcecode"><br/>&#160;&#160;&#160; <br/>&#160; puts x<br/></p><p class="SourceTitle" style="text-align:center;">Ruby <i>code</i></p>
467
467
  </div>
468
468
  <p>&#160;</p>
469
469
  </div>
@@ -31,7 +31,7 @@ RSpec.describe IsoDoc do
31
31
  <body>
32
32
  <div class="figure">
33
33
  <p>Warning</p>
34
- <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">&#160; </span></a>
34
+ <a href="#tableD-1a" class="TableFootnoteRef">a</a><aside><div id="ftntableD-1a"><span><span id="tableD-1a" class="TableFootnoteRef">a</span>&#160; </span>
35
35
  <p id="_0fe65e9a-5531-408e-8295-eeff35f41a55">Parboiled rice.</p>
36
36
  </div></aside>
37
37
  </div>
@@ -46,7 +46,7 @@ RSpec.describe IsoDoc do
46
46
  <aside><div id="ftntableD-1a">
47
47
 
48
48
  </div></aside>
49
- <p><b/></p><dl><dt><a id="tableD-1a" class="TableFootnoteRef">a<span style="mso-tab-count:1">&#xA0; </span></a></dt><dd><p id="_0fe65e9a-5531-408e-8295-eeff35f41a55">Parboiled rice.</p></dd></dl></div>
49
+ <p><b/></p><dl><dt><span><span id="tableD-1a" class="TableFootnoteRef">a</span>&#xA0; </span></dt><dd><p id="_0fe65e9a-5531-408e-8295-eeff35f41a55">Parboiled rice.</p></dd></dl></div>
50
50
  </body>
51
51
  </html>
52
52
  OUTPUT
@@ -58,7 +58,7 @@ RSpec.describe IsoDoc do
58
58
  <body>
59
59
  <div class="figure">
60
60
  <p>Warning</p>
61
- <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">&#160; </span></a>
61
+ <a href="#tableD-1a" class="TableFootnoteRef">a</a><aside><div id="ftntableD-1a"><span><span id="tableD-1a" class="TableFootnoteRef">a</span><span style="mso-tab-count:1">&#160; </span></span>
62
62
  <p id="_0fe65e9a-5531-408e-8295-eeff35f41a55">Parboiled rice.</p>
63
63
  </div></aside>
64
64
  </div>
@@ -73,7 +73,7 @@ RSpec.describe IsoDoc do
73
73
  <aside><div id="ftntableD-1a">
74
74
 
75
75
  </div></aside>
76
- <p><b/></p><table class="dl"><tr><td valign="top" align="left"><a id="tableD-1a" class="TableFootnoteRef">a<span style="mso-tab-count:1">&#xA0; </span></a></td><td valign="top"><p id="_0fe65e9a-5531-408e-8295-eeff35f41a55">Parboiled rice.</p></td></tr></table></div>
76
+ <p><b/></p><table class="dl"><tr><td valign="top" align="left"><span><span id="tableD-1a" class="TableFootnoteRef">a</span><span style="mso-tab-count:1">&#xA0; </span></span></td><td valign="top"><p id="_0fe65e9a-5531-408e-8295-eeff35f41a55">Parboiled rice.</p></td></tr></table></div>
77
77
  </body>
78
78
  </html>
79
79
  OUTPUT
@@ -150,71 +150,115 @@ RSpec.describe IsoDoc do
150
150
 
151
151
  it "cleans up footnotes" do
152
152
  expect(IsoDoc::HtmlConvert.new({}).cleanup(Nokogiri::XML(<<~"INPUT")).to_s).to be_equivalent_to <<~"OUTPUT"
153
- <html xmlns:epub="http://www.idpf.org/2007/ops">
154
- <head>
155
- <title>test</title>
156
- <body lang="EN-US" link="blue" vlink="#954F72">
157
- <div class="WordSection1">
158
- <p>&#160;</p>
159
- </div>
160
- <br clear="all" class="section"/>
161
- <div class="WordSection2">
162
- <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
153
+ #{HTML_HDR}
154
+ <br/>
163
155
  <div>
164
156
  <h1 class="ForewordTitle">Foreword</h1>
165
- <p>A.<a href="#ftn2" epub:type="footnote"><sup>2</sup></a></p>
166
- <p>B.<a href="#ftn2" epub:type="footnote"><sup>2</sup></a></p>
167
- <p>C.<a href="#ftn1" epub:type="footnote"><sup>1</sup></a></p>
157
+ <p>A.<a rel="footnote" href="#fn:2" epub:type="footnote"><sup>2</sup></a></p>
158
+ <p>B.<a rel="footnote" href="#fn:2" epub:type="footnote"><sup>2</sup></a></p>
159
+ <p>C.<a rel="footnote" href="#fn:1" epub:type="footnote"><sup>1</sup></a></p>
168
160
  </div>
169
- <p>&#160;</p>
170
- </div>
171
- <br clear="all" class="section"/>
172
- <div class="WordSection3">
173
161
  <p class="zzSTDTitle1"/>
174
- <aside id="ftn2">
175
- <p id="_1e228e29-baef-4f38-b048-b05a051747e4">Formerly denoted as 15 % (m/m).</p>
176
- </aside>
177
- <aside id="ftn1">
178
- <p id="_1e228e29-baef-4f38-b048-b05a051747e4">Hello! denoted as 15 % (m/m).</p>
179
- </aside>
162
+ <aside id="fn:2" class="footnote">
163
+ <p id="_1e228e29-baef-4f38-b048-b05a051747e4">Formerly denoted as 15 % (m/m).</p>
164
+ </aside>
165
+ <aside id="fn:1" class="footnote">
166
+ <p id="_1e228e29-baef-4f38-b048-b05a051747e4">Hello! denoted as 15 % (m/m).</p>
167
+ </aside>
180
168
  </div>
181
169
  </body>
182
- </head>
183
170
  </html>
184
171
  INPUT
185
- <?xml version="1.0"?>
186
- <html xmlns:epub="http://www.idpf.org/2007/ops">
187
- <head>
188
- <title>test</title>
172
+ #{HTML_HDR}
173
+ <br/>
174
+ <div>
175
+ <h1 class="ForewordTitle">Foreword</h1>
176
+ <p>A.<a rel="footnote" href="#fn:2" epub:type="footnote"><sup>1</sup></a></p>
177
+ <p>B.<a rel="footnote" href="#fn:2" epub:type="footnote"><sup>2</sup></a></p>
178
+ <p>C.<a rel="footnote" href="#fn:1" epub:type="footnote"><sup>3</sup></a></p>
179
+ </div>
180
+ <p class="zzSTDTitle1"/>
181
+ <aside id="fn:2" class="footnote">
182
+ <p id="_1e228e29-baef-4f38-b048-b05a051747e4">Formerly denoted as 15 % (m/m).</p>
183
+ </aside>
184
+ <aside id="fn:1" class="footnote">
185
+ <p id="_1e228e29-baef-4f38-b048-b05a051747e4">Hello! denoted as 15 % (m/m).</p>
186
+ </aside>
187
+ </div>
188
+ </body>
189
+ </html>
190
+ OUTPUT
191
+ end
192
+
193
+ it "cleans up footnotes (Word)" do
194
+ expect(IsoDoc::WordConvert.new({}).cleanup(Nokogiri::XML(<<~"INPUT")).to_s).to be_equivalent_to <<~"OUTPUT"
195
+ <html xmlns:epub="http://www.idpf.org/2007/ops" lang="en">
196
+ <head/>
189
197
  <body lang="EN-US" link="blue" vlink="#954F72">
190
198
  <div class="WordSection1">
191
- <p>&#xA0;</p>
199
+ <p>&#160;</p>
192
200
  </div>
193
- <br clear="all" class="section"/>
201
+ <p><br clear="all" class="section"/></p>
194
202
  <div class="WordSection2">
195
- <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
203
+ <p><br clear="all" style="mso-special-character:line-break;page-break-before:always"/></p>
196
204
  <div>
197
205
  <h1 class="ForewordTitle">Foreword</h1>
198
- <p>A.<a href="#ftn2" epub:type="footnote"><sup>1</sup></a></p>
206
+ <p>A.<a href="#ftn1" epub:type="footnote"><sup>1</sup></a></p>
199
207
  <p>B.<a href="#ftn2" epub:type="footnote"><sup>2</sup></a></p>
200
- <p>C.<a href="#ftn1" epub:type="footnote"><sup>3</sup></a></p>
208
+ <p>C.<a href="#ftn3" epub:type="footnote"><sup>3</sup></a></p>
201
209
  </div>
202
- <p>&#xA0;</p>
210
+ <p>&#160;</p>
203
211
  </div>
204
- <br clear="all" class="section"/>
212
+ <p><br clear="all" class="section"/></p>
205
213
  <div class="WordSection3">
206
214
  <p class="zzSTDTitle1"/>
215
+ <aside id="ftn1">
216
+ <p id="_1e228e29-baef-4f38-b048-b05a051747e4">Formerly denoted as 15 % (m/m).</p>
217
+ </aside>
207
218
  <aside id="ftn2">
208
219
  <p id="_1e228e29-baef-4f38-b048-b05a051747e4">Formerly denoted as 15 % (m/m).</p>
209
220
  </aside>
210
- <aside id="ftn1">
221
+ <aside id="ftn3">
211
222
  <p id="_1e228e29-baef-4f38-b048-b05a051747e4">Hello! denoted as 15 % (m/m).</p>
212
223
  </aside>
213
224
  </div>
214
225
  </body>
215
- </head>
216
226
  </html>
217
- OUTPUT
227
+ INPUT
228
+ <?xml version="1.0"?>
229
+ <html xmlns:epub="http://www.idpf.org/2007/ops" lang="en">
230
+ <head/>
231
+ <body lang="EN-US" link="blue" vlink="#954F72">
232
+ <div class="WordSection1">
233
+ <p>&#xA0;</p>
234
+ </div>
235
+ <p><br clear="all" class="section"/></p>
236
+ <div class="WordSection2">
237
+ <p><br clear="all" style="mso-special-character:line-break;page-break-before:always"/></p>
238
+ <div>
239
+ <h1 class="ForewordTitle">Foreword</h1>
240
+ <p>A.<a href="#ftn1" epub:type="footnote"><sup>1</sup></a></p>
241
+ <p>B.<a href="#ftn2" epub:type="footnote"><sup>2</sup></a></p>
242
+ <p>C.<a href="#ftn3" epub:type="footnote"><sup>3</sup></a></p>
243
+ </div>
244
+ <p>&#xA0;</p>
245
+ </div>
246
+ <p><br clear="all" class="section"/></p>
247
+ <div class="WordSection3">
248
+ <p class="zzSTDTitle1"/>
249
+ <aside id="ftn1">
250
+ <p id="_1e228e29-baef-4f38-b048-b05a051747e4">Formerly denoted as 15 % (m/m).</p>
251
+ </aside>
252
+ <aside id="ftn2">
253
+ <p id="_1e228e29-baef-4f38-b048-b05a051747e4">Formerly denoted as 15 % (m/m).</p>
254
+ </aside>
255
+ <aside id="ftn3">
256
+ <p id="_1e228e29-baef-4f38-b048-b05a051747e4">Hello! denoted as 15 % (m/m).</p>
257
+ </aside>
258
+ </div>
259
+ </body>
260
+ </html>
261
+ OUTPUT
218
262
  end
219
263
 
220
264
  it "cleans up tables with tfoot" do
@@ -242,7 +286,7 @@ RSpec.describe IsoDoc do
242
286
  </tr>
243
287
  <tr>
244
288
  <td align="left" style="border-top:none;border-bottom:solid windowtext 1.5pt;">Arborio</td>
245
- <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<span style="mso-tab-count:1">&#160; </span></a>
289
+ <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"><span><span id="tableD-1a" class="TableFootnoteRef">a</span>&#160; </span>
246
290
  <p id="_0fe65e9a-5531-408e-8295-eeff35f41a55">Parboiled rice.</p>
247
291
  </div></aside></td>
248
292
  <td align="center" style="border-top:none;border-bottom:solid windowtext 1.5pt;">Balilla<a href="#tableD-1a" class="TableFootnoteRef">a</a></td>
@@ -351,7 +395,7 @@ INPUT
351
395
  <tr><td colspan="5" style="border-top:0pt;border-bottom:solid windowtext 1.5pt;"><div id="" class="Note">
352
396
  <p class="Note">NOTE<span style="mso-tab-count:1">&#xA0; </span>This is a table about rice</p>
353
397
  </div><div class="TableFootnote"><div id="ftntableD-1a">
354
- <p id="_0fe65e9a-5531-408e-8295-eeff35f41a55" class="TableFootnote"><a id="tableD-1a" class="TableFootnoteRef">a<span style="mso-tab-count:1">&#xA0; </span></a>Parboiled rice.</p>
398
+ <p id="_0fe65e9a-5531-408e-8295-eeff35f41a55" class="TableFootnote"><span><span id="tableD-1a" class="TableFootnoteRef">a</span>&#xA0; </span>Parboiled rice.</p>
355
399
  </div></div></td></tr></tfoot>
356
400
  <dl>
357
401
  <dt>
@@ -399,7 +443,7 @@ INPUT
399
443
  </tr>
400
444
  <tr>
401
445
  <td align="left" style="border-top:none;border-bottom:solid windowtext 1.5pt;">Arborio</td>
402
- <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<span style="mso-tab-count:1">&#160; </span></a>
446
+ <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"><span><span id="tableD-1a" class="TableFootnoteRef">a</span><span style="mso-tab-count:1">&#160; </span></span>
403
447
  <p id="_0fe65e9a-5531-408e-8295-eeff35f41a55">Parboiled rice.</p>
404
448
  </div></aside></td>
405
449
  <td align="center" style="border-top:none;border-bottom:solid windowtext 1.5pt;">Balilla<a href="#tableD-1a" class="TableFootnoteRef">a</a></td>
@@ -508,7 +552,7 @@ INPUT
508
552
  <tr><td colspan="5" style="border-top:0pt;mso-border-top-alt:0pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;"><div id="" class="Note">
509
553
  <p class="Note">NOTE<span style="mso-tab-count:1">&#xA0; </span>This is a table about rice</p>
510
554
  </div><div class="TableFootnote"><div id="ftntableD-1a">
511
- <p id="_0fe65e9a-5531-408e-8295-eeff35f41a55" class="TableFootnote"><a id="tableD-1a" class="TableFootnoteRef">a<span style="mso-tab-count:1">&#xA0; </span></a>Parboiled rice.</p>
555
+ <p id="_0fe65e9a-5531-408e-8295-eeff35f41a55" class="TableFootnote"><span><span id="tableD-1a" class="TableFootnoteRef">a</span><span style="mso-tab-count:1">&#xA0; </span></span>Parboiled rice.</p>
512
556
  </div></div></td></tr></tfoot>
513
557
  <dl>
514
558
  <dt>
@@ -557,7 +601,7 @@ INPUT
557
601
  </tr>
558
602
  <tr>
559
603
  <td align="left" style="border-top:none;border-bottom:solid windowtext 1.5pt;">Arborio</td>
560
- <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<span style="mso-tab-count:1">&#160; </span></a>
604
+ <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"><span><span id="tableD-1a" class="TableFootnoteRef">a</span>&#160; </span>
561
605
  <p id="_0fe65e9a-5531-408e-8295-eeff35f41a55">Parboiled rice.</p>
562
606
  </div></aside></td>
563
607
  <td align="center" style="border-top:none;border-bottom:solid windowtext 1.5pt;">Balilla<a href="#tableD-1a" class="TableFootnoteRef">a</a></td>
@@ -656,7 +700,7 @@ INPUT
656
700
  <tfoot><tr><td colspan="5" style="border-top:0pt;border-bottom:solid windowtext 1.5pt;"><div id="" class="Note">
657
701
  <p class="Note">NOTE<span style="mso-tab-count:1">&#xA0; </span>This is a table about rice</p>
658
702
  </div><div class="TableFootnote"><div id="ftntableD-1a">
659
- <p id="_0fe65e9a-5531-408e-8295-eeff35f41a55" class="TableFootnote"><a id="tableD-1a" class="TableFootnoteRef">a<span style="mso-tab-count:1">&#xA0; </span></a>Parboiled rice.</p>
703
+ <p id="_0fe65e9a-5531-408e-8295-eeff35f41a55" class="TableFootnote"><span><span id="tableD-1a" class="TableFootnoteRef">a</span>&#xA0; </span>Parboiled rice.</p>
660
704
  </div></div></td></tr></tfoot></table>
661
705
  </div>
662
706
  <p>&#xA0;</p>
@@ -853,7 +853,7 @@ TOCLEVEL
853
853
  </p>
854
854
  <div>
855
855
  <h1 class="ForewordTitle">Foreword</h1>
856
- <p class="Sourcecode"><a name="samplecode" id="samplecode"></a><br/>&#xA0;&#xA0;&#xA0; <br/>&#xA0; &lt;xml&gt; &amp;<br/><p class="SourceTitle" style="text-align:center;">XML code</p></p>
856
+ <p class="Sourcecode" style="page-break-after:avoid;"><a name="samplecode" id="samplecode"></a><br/>&#xA0;&#xA0;&#xA0; <br/>&#xA0; &lt;xml&gt; &amp;<br/></p><p class="SourceTitle" style="text-align:center;">XML code</p>
857
857
  </div>
858
858
  <p class="MsoNormal">&#xA0;</p>
859
859
  </div>
@@ -916,7 +916,7 @@ FileUtils.rm_f "test.doc"
916
916
  <h1 class="ForewordTitle">Foreword</h1>
917
917
  <div class="figure"><a name="fig1" id="fig1"></a>
918
918
 
919
- <p style="text-align:center;page-break-after:avoid;" class="MsoNormal"><img src="_" width="400" height="337"/></p>
919
+ <p style="page-break-after:avoid;" class="figure"><img src="_" width="400" height="337"/></p>
920
920
  <p class="FigureTitle" style="text-align:center;">Figure 1&#xA0;&#x2014; Typical arrangement of the far-field scan set-up</p></div>
921
921
  </div>
922
922
  <p class="MsoNormal">&#xA0;</p>
@@ -79,7 +79,7 @@ RSpec.describe IsoDoc do
79
79
  </tr>
80
80
  <tr>
81
81
  <td style="text-align:left;border-top:none;border-bottom:solid windowtext 1.5pt;padding:0;" scope="col">Arborio</td>
82
- <td style="text-align:center;border-top:none;border-bottom:solid windowtext 1.5pt;padding:0;" scope="col">Drago<a href="#tableD-1a" class="TableFootnoteRef">a</a><aside class="footnote"><div id="fn:tableD-1a"><a id="tableD-1a" class="TableFootnoteRef">a&#160; </a>
82
+ <td style="text-align:center;border-top:none;border-bottom:solid windowtext 1.5pt;padding:0;" scope="col">Drago<a href="#tableD-1a" class="TableFootnoteRef">a</a><aside class="footnote"><div id="fn:tableD-1a"><span><span id="tableD-1a" class="TableFootnoteRef">a</span>&#160; </span>
83
83
  <p id="_0fe65e9a-5531-408e-8295-eeff35f41a55">Parboiled rice.</p>
84
84
  </div></aside></td>
85
85
  <td style="text-align:center;border-top:none;border-bottom:solid windowtext 1.5pt;padding:0;" scope="col">Balilla<a href="#tableD-1a" class="TableFootnoteRef">a</a></td>
@@ -229,7 +229,7 @@ RSpec.describe IsoDoc do
229
229
  </tr>
230
230
  <tr>
231
231
  <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>
232
- <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">&#160; </span></a>
232
+ <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"><span><span id="tableD-1a" class="TableFootnoteRef">a</span><span style="mso-tab-count:1">&#160; </span></span>
233
233
  <p id="_0fe65e9a-5531-408e-8295-eeff35f41a55">Parboiled rice.</p>
234
234
  </div></aside></td>
235
235
  <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>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isodoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-20 00:00:00.000000000 Z
11
+ date: 2019-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciimath
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.8.11
89
+ version: 0.9.0
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.8.11
96
+ version: 0.9.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: liquid
99
99
  requirement: !ruby/object:Gem::Requirement