isodoc 2.1.0.1 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/isodoc.gemspec +6 -3
  3. data/lib/isodoc/base_style/blocks.scss +7 -0
  4. data/lib/isodoc/class_utils.rb +1 -1
  5. data/lib/isodoc/function/blocks.rb +1 -1
  6. data/lib/isodoc/function/cleanup.rb +1 -1
  7. data/lib/isodoc/function/inline.rb +4 -2
  8. data/lib/isodoc/function/lists.rb +24 -9
  9. data/lib/isodoc/function/table.rb +1 -1
  10. data/lib/isodoc/function/to_word_html.rb +3 -2
  11. data/lib/isodoc/function/utils.rb +18 -8
  12. data/lib/isodoc/gem_tasks.rb +19 -10
  13. data/lib/isodoc/html_function/html.rb +2 -2
  14. data/lib/isodoc/i18n.rb +19 -0
  15. data/lib/isodoc/metadata.rb +2 -2
  16. data/lib/isodoc/presentation_function/block.rb +3 -3
  17. data/lib/isodoc/presentation_function/image.rb +1 -1
  18. data/lib/isodoc/presentation_function/inline.rb +13 -6
  19. data/lib/isodoc/presentation_function/section.rb +3 -1
  20. data/lib/isodoc/presentation_function/xrefs.rb +22 -6
  21. data/lib/isodoc/presentation_xml_convert.rb +1 -0
  22. data/lib/isodoc/version.rb +1 -1
  23. data/lib/isodoc/word_function/body.rb +9 -6
  24. data/lib/isodoc/word_function/postprocess.rb +1 -1
  25. data/lib/isodoc/word_function/postprocess_cover.rb +5 -5
  26. data/lib/isodoc/xref/xref_gen.rb +4 -4
  27. metadata +5 -66
  28. data/.github/workflows/rake.yml +0 -15
  29. data/.github/workflows/release.yml +0 -24
  30. data/.hound.yml +0 -5
  31. data/.oss-guides.rubocop.yml +0 -1077
  32. data/.rubocop.yml +0 -10
  33. data/Rakefile +0 -8
  34. data/bin/rspec +0 -17
  35. data/spec/assets/header.html +0 -7
  36. data/spec/assets/html.scss +0 -20
  37. data/spec/assets/html_override.css +0 -1
  38. data/spec/assets/htmlcover.html +0 -4
  39. data/spec/assets/htmlintro.html +0 -5
  40. data/spec/assets/i18n.yaml +0 -41
  41. data/spec/assets/iso.xml +0 -8
  42. data/spec/assets/odf.emf +0 -0
  43. data/spec/assets/odf.svg +0 -1
  44. data/spec/assets/odf1.svg +0 -4
  45. data/spec/assets/outputtest/a.xml +0 -66
  46. data/spec/assets/outputtest/iso.international-standard.xsl +0 -3011
  47. data/spec/assets/rice_image1 +0 -0
  48. data/spec/assets/rice_image1.png +0 -0
  49. data/spec/assets/scripts.html +0 -3
  50. data/spec/assets/scripts_override.html +0 -3
  51. data/spec/assets/std.css +0 -2
  52. data/spec/assets/word.css +0 -2
  53. data/spec/assets/word_override.css +0 -1
  54. data/spec/assets/wordcover.html +0 -3
  55. data/spec/assets/wordintro.html +0 -4
  56. data/spec/isodoc/blocks_spec.rb +0 -2934
  57. data/spec/isodoc/cleanup_spec.rb +0 -1056
  58. data/spec/isodoc/footnotes_spec.rb +0 -264
  59. data/spec/isodoc/form_spec.rb +0 -160
  60. data/spec/isodoc/i18n_spec.rb +0 -1201
  61. data/spec/isodoc/inline_spec.rb +0 -2301
  62. data/spec/isodoc/lists_spec.rb +0 -469
  63. data/spec/isodoc/metadata_spec.rb +0 -401
  64. data/spec/isodoc/postproc_spec.rb +0 -2941
  65. data/spec/isodoc/presentation_xml_spec.rb +0 -1476
  66. data/spec/isodoc/ref_spec.rb +0 -955
  67. data/spec/isodoc/section_spec.rb +0 -2123
  68. data/spec/isodoc/table_spec.rb +0 -588
  69. data/spec/isodoc/terms_spec.rb +0 -712
  70. data/spec/isodoc/utils_spec.rb +0 -57
  71. data/spec/isodoc/xref_numbering_spec.rb +0 -378
  72. data/spec/isodoc/xref_spec.rb +0 -1837
  73. data/spec/isodoc/xslfo_convert_spec.rb +0 -103
  74. data/spec/spec_helper.rb +0 -81
@@ -60,7 +60,7 @@ module IsoDoc
60
60
  <span lang="EN-GB"><span
61
61
  style='mso-element:field-begin'></span><span
62
62
  style='mso-spacerun:yes'>&#xA0;</span>TOC
63
- \\o &quot;1-#{level}&quot; \\h \\z \\u <span
63
+ \\o "1-#{level}" \\h \\z \\u <span
64
64
  style='mso-element:field-separator'></span></span>
65
65
  TOC
66
66
  end
@@ -68,7 +68,7 @@ module IsoDoc
68
68
  WORD_TOC_SUFFIX1 = <<~TOC.freeze
69
69
  <p class="MsoToc1"><span lang="EN-GB"><span
70
70
  style='mso-element:field-end'></span></span><span
71
- lang="EN-GB"><o:p>&nbsp;</o:p></span></p>
71
+ lang="EN-GB"><o:p>&#xA0;</o:p></span></p>
72
72
  TOC
73
73
 
74
74
  def make_WordToC(docxml, level)
@@ -86,7 +86,7 @@ module IsoDoc
86
86
  <span lang="EN-GB"><span
87
87
  style='mso-element:field-begin'></span><span
88
88
  style='mso-spacerun:yes'>&#xA0;</span>TOC
89
- \\h \\z \\t &quot;RecommendationTitle,RecommendationTestTitle,recommendationtitle,recommendationtesttitle&quot;
89
+ \\h \\z \\t "RecommendationTitle,RecommendationTestTitle,recommendationtitle,recommendationtesttitle"
90
90
  <span style='mso-element:field-separator'></span></span>
91
91
  TOC
92
92
 
@@ -94,7 +94,7 @@ module IsoDoc
94
94
  <span lang="EN-GB"><span
95
95
  style='mso-element:field-begin'></span><span
96
96
  style='mso-spacerun:yes'>&#xA0;</span>TOC
97
- \\h \\z \\t &quot;TableTitle,tabletitle&quot; <span
97
+ \\h \\z \\t "TableTitle,tabletitle" <span
98
98
  style='mso-element:field-separator'></span></span>
99
99
  TOC
100
100
 
@@ -102,7 +102,7 @@ module IsoDoc
102
102
  <span lang="EN-GB"><span
103
103
  style='mso-element:field-begin'></span><span
104
104
  style='mso-spacerun:yes'>&#xA0;</span>TOC
105
- \\h \\z \\t &quot;FigureTitle,figuretitle&quot; <span
105
+ \\h \\z \\t "FigureTitle,figuretitle" <span
106
106
  style='mso-element:field-separator'></span></span>
107
107
  TOC
108
108
 
@@ -43,7 +43,7 @@ module IsoDoc
43
43
  end
44
44
 
45
45
  def termnote_anchor_names(docxml)
46
- docxml.xpath(ns("//term[termnote]")).each do |t|
46
+ docxml.xpath(ns("//*[termnote]")).each do |t|
47
47
  c = Counter.new
48
48
  t.xpath(ns("./termnote")).reject { |n| blank?(n["id"]) }.each do |n|
49
49
  c.increment(n)
@@ -57,7 +57,7 @@ module IsoDoc
57
57
  end
58
58
 
59
59
  def termexample_anchor_names(docxml)
60
- docxml.xpath(ns("//term[termexample]")).each do |t|
60
+ docxml.xpath(ns("//*[termexample]")).each do |t|
61
61
  examples = t.xpath(ns("./termexample"))
62
62
  c = Counter.new
63
63
  examples.reject { |n| blank?(n["id"]) }.each do |n|
@@ -148,12 +148,12 @@ module IsoDoc
148
148
  c = Counter.new(list["start"] ? list["start"].to_i - 1 : 0)
149
149
  list.xpath(ns("./li")).each do |li|
150
150
  label = c.increment(li).listlabel(list, depth)
151
- label = "#{prev_label}.#{label}" unless prev_label.empty?
151
+ label = "#{prev_label}) #{label}" unless prev_label.empty?
152
152
  label = "#{list_anchor[:xref]} #{label}" if refer_list
153
153
  li["id"] and @anchors[li["id"]] =
154
154
  { xref: "#{label})", type: "listitem",
155
155
  container: list_anchor[:container] }
156
- li.xpath(ns("./ol")).each do |ol|
156
+ (li.xpath(ns(".//ol")) - li.xpath(ns(".//ol//ol"))).each do |ol|
157
157
  list_item_anchor_names(ol, list_anchor, depth + 1, label, false)
158
158
  end
159
159
  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: 2.1.0.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-09 00:00:00.000000000 Z
11
+ date: 2022-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciimath
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.4.0
33
+ version: 1.4.1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.4.0
40
+ version: 1.4.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: htmlentities
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -122,20 +122,6 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
- - !ruby/object:Gem::Dependency
126
- name: nokogiri
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: 1.12.0
132
- type: :runtime
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "~>"
137
- - !ruby/object:Gem::Version
138
- version: 1.12.0
139
125
  - !ruby/object:Gem::Dependency
140
126
  name: relaton-cli
141
127
  requirement: !ruby/object:Gem::Requirement
@@ -399,17 +385,10 @@ executables: []
399
385
  extensions: []
400
386
  extra_rdoc_files: []
401
387
  files:
402
- - ".github/workflows/rake.yml"
403
- - ".github/workflows/release.yml"
404
- - ".hound.yml"
405
- - ".oss-guides.rubocop.yml"
406
- - ".rubocop.yml"
407
388
  - CODE_OF_CONDUCT.md
408
389
  - Gemfile
409
390
  - LICENSE
410
391
  - README.adoc
411
- - Rakefile
412
- - bin/rspec
413
392
  - isodoc.gemspec
414
393
  - lib/isodoc-yaml/i18n-ar.yaml
415
394
  - lib/isodoc-yaml/i18n-de.yaml
@@ -506,46 +485,6 @@ files:
506
485
  - lib/metanorma/output/xslfo.rb
507
486
  - lib/relaton/render/config.yml
508
487
  - lib/relaton/render/general.rb
509
- - spec/assets/header.html
510
- - spec/assets/html.scss
511
- - spec/assets/html_override.css
512
- - spec/assets/htmlcover.html
513
- - spec/assets/htmlintro.html
514
- - spec/assets/i18n.yaml
515
- - spec/assets/iso.xml
516
- - spec/assets/odf.emf
517
- - spec/assets/odf.svg
518
- - spec/assets/odf1.svg
519
- - spec/assets/outputtest/a.xml
520
- - spec/assets/outputtest/iso.international-standard.xsl
521
- - spec/assets/rice_image1
522
- - spec/assets/rice_image1.png
523
- - spec/assets/scripts.html
524
- - spec/assets/scripts_override.html
525
- - spec/assets/std.css
526
- - spec/assets/word.css
527
- - spec/assets/word_override.css
528
- - spec/assets/wordcover.html
529
- - spec/assets/wordintro.html
530
- - spec/isodoc/blocks_spec.rb
531
- - spec/isodoc/cleanup_spec.rb
532
- - spec/isodoc/footnotes_spec.rb
533
- - spec/isodoc/form_spec.rb
534
- - spec/isodoc/i18n_spec.rb
535
- - spec/isodoc/inline_spec.rb
536
- - spec/isodoc/lists_spec.rb
537
- - spec/isodoc/metadata_spec.rb
538
- - spec/isodoc/postproc_spec.rb
539
- - spec/isodoc/presentation_xml_spec.rb
540
- - spec/isodoc/ref_spec.rb
541
- - spec/isodoc/section_spec.rb
542
- - spec/isodoc/table_spec.rb
543
- - spec/isodoc/terms_spec.rb
544
- - spec/isodoc/utils_spec.rb
545
- - spec/isodoc/xref_numbering_spec.rb
546
- - spec/isodoc/xref_spec.rb
547
- - spec/isodoc/xslfo_convert_spec.rb
548
- - spec/spec_helper.rb
549
488
  homepage: https://github.com/metanorma/isodoc
550
489
  licenses:
551
490
  - BSD-2-Clause
@@ -565,7 +504,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
565
504
  - !ruby/object:Gem::Version
566
505
  version: '0'
567
506
  requirements: []
568
- rubygems_version: 3.3.9
507
+ rubygems_version: 3.3.7
569
508
  signing_key:
570
509
  specification_version: 4
571
510
  summary: Convert documents in IsoDoc into Word and HTML in AsciiDoc.
@@ -1,15 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: rake
4
-
5
- on:
6
- push:
7
- branches: [ master, main ]
8
- tags: [ v* ]
9
- pull_request:
10
-
11
- jobs:
12
- rake:
13
- uses: metanorma/metanorma-build-scripts/.github/workflows/inkscape-rake.yml@main
14
- secrets:
15
- pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
@@ -1,24 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: release
4
-
5
- on:
6
- workflow_dispatch:
7
- inputs:
8
- next_version:
9
- description: |
10
- Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
11
- required: true
12
- default: 'skip'
13
- push:
14
- tags: [ v* ]
15
-
16
- jobs:
17
- release:
18
- uses: metanorma/metanorma-build-scripts/.github/workflows/rubygems-release.yml@main
19
- with:
20
- next_version: ${{ github.event.inputs.next_version }}
21
- event_name: ${{ github.event_name }}
22
- secrets:
23
- rubygems-api-key: ${{ secrets.METANORMA_CI_RUBYGEMS_API_KEY }}
24
-
data/.hound.yml DELETED
@@ -1,5 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- ruby:
4
- enabled: true
5
- config_file: .rubocop.yml