isodoc 0.9.11 → 0.9.12

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: '00160137956d6bf94a5ae197a7cb4b88ad74c0a4c60b421cb37bbe23abe8cd31'
4
- data.tar.gz: aaeb75e3aecc1cf19729b046332dcab2ca732357f08c22f2631eddf65ec5bf5f
3
+ metadata.gz: a6c03a961d5e4f165ec88b0cadd23ce527a11dc362321fa1b0f3a13dd85661ba
4
+ data.tar.gz: 1e3dea00b58de59aa785fa6b62d3edceb73f6be39989dfce81ab89760b53bd96
5
5
  SHA512:
6
- metadata.gz: f2ebe7192825e49355716ec580fc6da530d48475a6da2a9d4896c0a7d36927967b02f0f1f1a1cc198d91f0f4a1839d257bdc1b9d6e4d0b73ecc288ee08db3709
7
- data.tar.gz: 01e04c0e9c669c5d6746fc5618f517bda045258202e234550223d37180d4db5d2dea873df2e651733f64cbf942d7963b5d4634a236f7e21949ee4467c536dcf1
6
+ metadata.gz: cab6416eca981238438c32ec69ae6b184bd57402b2083d7d38c72e7ff44f1789132955ae5549624e1851ed86d60318bccd064068cb05c918e69579ac2ed65433
7
+ data.tar.gz: 35e405f5e62583960fe5d55b1b4d961290bf64629126b9b56ab3053c5799afa0278d7ddd73f249c91a58100fe8945db4f09720d03bed961b2f9da206dc51be77
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- isodoc (0.9.11)
4
+ isodoc (0.9.12)
5
5
  asciimath
6
6
  html2doc (~> 0.8.6)
7
7
  htmlentities (~> 4.3.4)
@@ -18,6 +18,7 @@ PATH
18
18
  GEM
19
19
  remote: https://rubygems.org/
20
20
  specs:
21
+ asciidoctor (1.5.8)
21
22
  asciimath (1.0.6)
22
23
  ast (2.4.0)
23
24
  byebug (9.1.0)
@@ -53,7 +54,6 @@ GEM
53
54
  uuidtools
54
55
  htmlentities (4.3.4)
55
56
  image_size (2.0.0)
56
- jaro_winkler (1.5.1)
57
57
  json (2.1.0)
58
58
  liquid (4.0.1)
59
59
  listen (3.1.5)
@@ -61,7 +61,8 @@ GEM
61
61
  rb-inotify (~> 0.9, >= 0.9.7)
62
62
  ruby_dep (~> 1.2)
63
63
  lumberjack (1.0.13)
64
- metanorma (0.3.2)
64
+ metanorma (0.3.5)
65
+ asciidoctor
65
66
  method_source (0.9.2)
66
67
  mime-types (3.2.2)
67
68
  mime-types-data (~> 3.2015)
@@ -81,7 +82,7 @@ GEM
81
82
  coderay (~> 1.1.0)
82
83
  method_source (~> 0.9.0)
83
84
  rainbow (3.0.0)
84
- rake (12.3.1)
85
+ rake (12.3.2)
85
86
  rb-fsevent (0.10.3)
86
87
  rb-inotify (0.9.10)
87
88
  ffi (>= 0.5.0, < 2)
@@ -99,14 +100,13 @@ GEM
99
100
  diff-lcs (>= 1.2.0, < 2.0)
100
101
  rspec-support (~> 3.8.0)
101
102
  rspec-support (3.8.0)
102
- rubocop (0.60.0)
103
- jaro_winkler (~> 1.5.1)
103
+ rubocop (0.54.0)
104
104
  parallel (~> 1.10)
105
- parser (>= 2.5, != 2.5.1.1)
105
+ parser (>= 2.5)
106
106
  powerpack (~> 0.1)
107
107
  rainbow (>= 2.2.2, < 4.0)
108
108
  ruby-progressbar (~> 1.7)
109
- unicode-display_width (~> 1.4.0)
109
+ unicode-display_width (~> 1.0, >= 1.0.1)
110
110
  ruby-progressbar (1.10.0)
111
111
  ruby-xslt (0.9.10)
112
112
  ruby_dep (1.5.0)
@@ -141,7 +141,7 @@ DEPENDENCIES
141
141
  guard-rspec (~> 4.7)
142
142
  isodoc!
143
143
  rspec (~> 3.6)
144
- rubocop (~> 0.50)
144
+ rubocop (= 0.54.0)
145
145
  simplecov (~> 0.15)
146
146
  timecop (~> 0.9)
147
147
 
@@ -47,7 +47,7 @@ Gem::Specification.new do |spec|
47
47
  spec.add_development_dependency "guard", "~> 2.14"
48
48
  spec.add_development_dependency "guard-rspec", "~> 4.7"
49
49
  spec.add_development_dependency "rspec", "~> 3.6"
50
- spec.add_development_dependency "rubocop", "~> 0.50"
50
+ spec.add_development_dependency "rubocop", "= 0.54.0"
51
51
  spec.add_development_dependency "simplecov", "~> 0.15"
52
52
  spec.add_development_dependency "timecop", "~> 0.9"
53
53
  end
@@ -127,6 +127,10 @@ module IsoDoc::Function
127
127
  end
128
128
  end
129
129
 
130
+ def pre_parse(node, out)
131
+ out.pre node.text, **attr_code(id: node["id"])
132
+ end
133
+
130
134
  def annotation_parse(node, out)
131
135
  @sourcecode = false
132
136
  @annotation = true
@@ -29,9 +29,12 @@ module IsoDoc::Function
29
29
 
30
30
  # tmp image dir is same directory as @filename
31
31
  def tmpimagedir
32
- @filename.sub(%r{^.*/([^/]+)$}, "\\1") + @tmpimagedir
32
+ @filename + @tmpimagedir
33
33
  end
34
34
 
35
+ def rel_tmpimagedir
36
+ @filename.sub(%r{^.*/([^/]+)$}, "\\1") + @tmpimagedir
37
+ end
35
38
 
36
39
  # isodoc.css overrides any CSS injected by Html2Doc, which
37
40
  # is inserted before this CSS.
@@ -178,6 +181,7 @@ module IsoDoc::Function
178
181
  when "example" then example_parse(node, out)
179
182
  when "image" then image_parse(node, out, nil)
180
183
  when "sourcecode" then sourcecode_parse(node, out)
184
+ when "pre" then pre_parse(node, out)
181
185
  when "annotation" then annotation_parse(node, out)
182
186
  when "term" then termdef_parse(node, out)
183
187
  when "preferred" then term_parse(node, out)
@@ -214,10 +214,11 @@ module IsoDoc::HtmlFunction
214
214
  def move_image1(i)
215
215
  matched = /\.(?<suffix>\S+)$/.match i["src"]
216
216
  uuid = UUIDTools::UUID.random_create.to_s
217
- new_full_filename = File.join(tmpimagedir, "#{uuid}.#{matched[:suffix]}")
217
+ fname = "#{uuid}.#{matched[:suffix]}"
218
+ new_full_filename = File.join(tmpimagedir, fname)
218
219
  local_filename = File.join(@localdir, i["src"])
219
220
  FileUtils.cp local_filename, new_full_filename
220
- i["src"] = new_full_filename
221
+ i["src"] = File.join(rel_tmpimagedir, fname)
221
222
  i["width"], i["height"] = Html2Doc.image_resize(i, local_filename, @maxheight, @maxwidth)
222
223
  end
223
224
 
@@ -1,3 +1,3 @@
1
1
  module IsoDoc
2
- VERSION = "0.9.11".freeze
2
+ VERSION = "0.9.12".freeze
3
3
  end
@@ -237,6 +237,10 @@ INPUT
237
237
  <dt>A</dt>
238
238
  <dd><p>B</p></dd>
239
239
  </dl>
240
+ </figure>
241
+ <figure>
242
+ <pre>A &lt;
243
+ B</pre>
240
244
  </figure>
241
245
  </foreword></preface>
242
246
  </iso-standard>
@@ -254,6 +258,10 @@ INPUT
254
258
  </div></aside>
255
259
  <p><b>Key</b></p><dl><dt><p>A</p></dt><dd><p>B</p></dd></dl>
256
260
  <p class="FigureTitle" align="center">Figure 1&#160;&#8212; Split-it-right <i>sample</i> divider</p></div>
261
+ <div class="figure">
262
+ <pre>A &lt;
263
+ B</pre>
264
+ </div>
257
265
  </div>
258
266
  <p class="zzSTDTitle1"/>
259
267
  </div>
@@ -277,6 +285,10 @@ INPUT
277
285
  <dt>A</dt>
278
286
  <dd><p>B</p></dd>
279
287
  </dl>
288
+ </figure>
289
+ <figure>
290
+ <pre>A &lt;
291
+ B</pre>
280
292
  </figure>
281
293
  </foreword></preface>
282
294
  </iso-standard>
@@ -301,6 +313,10 @@ INPUT
301
313
  </div></aside>
302
314
  <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>
303
315
  <p class="FigureTitle" align="center">Figure 1&#160;&#8212; Split-it-right sample divider</p></div>
316
+ <div class="figure">
317
+ <pre>A &lt;
318
+ B</pre>
319
+ </div>
304
320
  </div>
305
321
  <p>&#160;</p>
306
322
  </div>
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: 0.9.11
4
+ version: 0.9.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-27 00:00:00.000000000 Z
11
+ date: 2018-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciimath
@@ -266,16 +266,16 @@ dependencies:
266
266
  name: rubocop
267
267
  requirement: !ruby/object:Gem::Requirement
268
268
  requirements:
269
- - - "~>"
269
+ - - '='
270
270
  - !ruby/object:Gem::Version
271
- version: '0.50'
271
+ version: 0.54.0
272
272
  type: :development
273
273
  prerelease: false
274
274
  version_requirements: !ruby/object:Gem::Requirement
275
275
  requirements:
276
- - - "~>"
276
+ - - '='
277
277
  - !ruby/object:Gem::Version
278
- version: '0.50'
278
+ version: 0.54.0
279
279
  - !ruby/object:Gem::Dependency
280
280
  name: simplecov
281
281
  requirement: !ruby/object:Gem::Requirement