isodoc 0.5.9 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/isodoc.gemspec +1 -0
- data/lib/isodoc.rb +2 -0
- data/lib/isodoc/convert.rb +17 -1
- data/lib/isodoc/footnotes.rb +8 -3
- data/lib/isodoc/html.rb +65 -27
- data/lib/isodoc/i18n-en.yaml +1 -1
- data/lib/isodoc/iso/convert.rb +46 -0
- data/lib/isodoc/iso/html/header.html +184 -0
- data/lib/isodoc/iso/html/html_iso_intro.html +34 -0
- data/lib/isodoc/iso/html/html_iso_titlepage.html +32 -0
- data/lib/isodoc/iso/html/htmlstyle.scss +46 -0
- data/lib/isodoc/iso/html/isodoc.scss +679 -0
- data/lib/isodoc/iso/html/scripts.html +174 -0
- data/lib/isodoc/iso/html/style-human.scss +1277 -0
- data/lib/isodoc/iso/html/style-iso.scss +1257 -0
- data/lib/isodoc/iso/html/word_iso_intro.html +72 -0
- data/lib/isodoc/iso/html/word_iso_titlepage.html +58 -0
- data/lib/isodoc/iso/html/wordstyle.scss +1135 -0
- data/lib/isodoc/iso/wordconvert.rb +34 -0
- data/lib/isodoc/iso2wordhtml.rb +17 -23
- data/lib/isodoc/section.rb +1 -1
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/wordconvert/comments.rb +0 -15
- data/lib/isodoc/wordconvert/convert.rb +1 -0
- data/lib/isodoc/wordconvert/footnotes.rb +0 -12
- data/lib/isodoc/wordconvert/postprocess.rb +110 -0
- data/lib/isodoc/wordconvert/wordconvertmodule.rb +18 -130
- data/lib/isodoc/xref_sect_gen.rb +7 -4
- data/spec/assets/scripts.html +3 -1
- data/spec/isodoc/blocks_spec.rb +97 -211
- data/spec/isodoc/cleanup_spec.rb +27 -0
- data/spec/isodoc/footnotes_spec.rb +40 -53
- data/spec/isodoc/i18n_spec.rb +4 -56
- data/spec/isodoc/inline_spec.rb +7 -98
- data/spec/isodoc/iso_spec.rb +89 -0
- data/spec/isodoc/lists_spec.rb +5 -57
- data/spec/isodoc/postproc_spec.rb +43 -79
- data/spec/isodoc/ref_spec.rb +4 -17
- data/spec/isodoc/section_spec.rb +11 -24
- data/spec/isodoc/table_spec.rb +61 -76
- data/spec/isodoc/terms_spec.rb +1 -13
- data/spec/isodoc/xref_spec.rb +21 -164
- data/spec/spec_helper.rb +21 -1
- metadata +31 -2
data/spec/spec_helper.rb
CHANGED
@@ -21,6 +21,26 @@ RSpec.configure do |config|
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def strip_guid(x)
|
24
|
-
x.gsub(%r{ id="_[^"]+"}, ' id="_"').gsub(%r{ target="_[^"]+"}, ' target="_"')
|
24
|
+
x.gsub(%r{ id="_[^"]+"}, ' id="_"').gsub(%r{ target="_[^"]+"}, ' target="_"').
|
25
|
+
gsub(%r( href="#[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{13}"), ' href="#_"').
|
26
|
+
gsub(%r( id="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{13}"), ' id="_"').
|
27
|
+
gsub(%r( id="ftn[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{13}"), ' id="ftn_"').
|
28
|
+
gsub(%r( id="fn:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{13}"), ' id="fn:_"')
|
25
29
|
end
|
26
30
|
|
31
|
+
HTML_HDR = <<~END
|
32
|
+
<html xmlns:epub="http://www.idpf.org/2007/ops">
|
33
|
+
<head>
|
34
|
+
<title>test</title>
|
35
|
+
</head>
|
36
|
+
<body lang="EN-US" link="blue" vlink="#954F72">
|
37
|
+
<div class="WordSection1">
|
38
|
+
<p> </p>
|
39
|
+
</div>
|
40
|
+
<br/>
|
41
|
+
<div class="WordSection2">
|
42
|
+
<p> </p>
|
43
|
+
</div>
|
44
|
+
<br/>
|
45
|
+
<div class="WordSection3">
|
46
|
+
END
|
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.
|
4
|
+
version: 0.6.0
|
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-05-
|
11
|
+
date: 2018-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciimath
|
@@ -164,6 +164,20 @@ dependencies:
|
|
164
164
|
- - ">="
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: sass
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :runtime
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
167
181
|
- !ruby/object:Gem::Dependency
|
168
182
|
name: bundler
|
169
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -339,6 +353,19 @@ files:
|
|
339
353
|
- lib/isodoc/i18n-zh-Hans.yaml
|
340
354
|
- lib/isodoc/i18n.rb
|
341
355
|
- lib/isodoc/inline.rb
|
356
|
+
- lib/isodoc/iso/convert.rb
|
357
|
+
- lib/isodoc/iso/html/header.html
|
358
|
+
- lib/isodoc/iso/html/html_iso_intro.html
|
359
|
+
- lib/isodoc/iso/html/html_iso_titlepage.html
|
360
|
+
- lib/isodoc/iso/html/htmlstyle.scss
|
361
|
+
- lib/isodoc/iso/html/isodoc.scss
|
362
|
+
- lib/isodoc/iso/html/scripts.html
|
363
|
+
- lib/isodoc/iso/html/style-human.scss
|
364
|
+
- lib/isodoc/iso/html/style-iso.scss
|
365
|
+
- lib/isodoc/iso/html/word_iso_intro.html
|
366
|
+
- lib/isodoc/iso/html/word_iso_titlepage.html
|
367
|
+
- lib/isodoc/iso/html/wordstyle.scss
|
368
|
+
- lib/isodoc/iso/wordconvert.rb
|
342
369
|
- lib/isodoc/iso2wordhtml.rb
|
343
370
|
- lib/isodoc/lists.rb
|
344
371
|
- lib/isodoc/metadata.rb
|
@@ -351,6 +378,7 @@ files:
|
|
351
378
|
- lib/isodoc/wordconvert/comments.rb
|
352
379
|
- lib/isodoc/wordconvert/convert.rb
|
353
380
|
- lib/isodoc/wordconvert/footnotes.rb
|
381
|
+
- lib/isodoc/wordconvert/postprocess.rb
|
354
382
|
- lib/isodoc/wordconvert/wordconvertmodule.rb
|
355
383
|
- lib/isodoc/xref_gen.rb
|
356
384
|
- lib/isodoc/xref_sect_gen.rb
|
@@ -371,6 +399,7 @@ files:
|
|
371
399
|
- spec/isodoc/footnotes_spec.rb
|
372
400
|
- spec/isodoc/i18n_spec.rb
|
373
401
|
- spec/isodoc/inline_spec.rb
|
402
|
+
- spec/isodoc/iso_spec.rb
|
374
403
|
- spec/isodoc/lists_spec.rb
|
375
404
|
- spec/isodoc/metadata_spec.rb
|
376
405
|
- spec/isodoc/postproc_spec.rb
|