metanorma-standoc 1.1.8 → 1.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 824b1e03a0d0ad3473df22d417991f5e7a1dbf551143d0a810c3b0d66a126f4e
4
- data.tar.gz: 67a0fe247f7c6bf8339bcd8e0188a2b301b44fd865d8c171bd39508ca42f6246
3
+ metadata.gz: e60988dd72d65a660d97266b8e2a0afd786b619f97e7cf948e040a1b31f7d6fc
4
+ data.tar.gz: ef5405bcb35b0250cbfbbf30b092a4dd0f0cbaf4435edfab0b8dcf4ddd46cc14
5
5
  SHA512:
6
- metadata.gz: e1a583f8f45b49cc1645bda7eea76e45750eadec72abc248db93e980fde9d96525e6c2fa80de2092ca0db4b58b5e58159621059ceab9a4a383ecc4a67a4a8202
7
- data.tar.gz: 7dfff1109a7d3fb6905840170fe738c94301c3521c65786702a5f6055756885acb20f0cf013ead5d1004bfe6e9b558bb9e679f4d45ee73e9d1cef8cbfb8d9219
6
+ metadata.gz: e2af11f2fecbfa996d3fda092aabcfd3803117f98afdff33471e27182db1931359acb16379eaa29a998ae3667eea31e3622029cba4c110ab1daa6063d0cf9b2c
7
+ data.tar.gz: 3f19ae9393a94ceb2dd768f926f14f6ea798ae8be156f9aad3fa578d9eeb93e8e7d82a0f9af1d0eeefe53cb3e5bc4578cd3e959df268c06e0dbe4274dce1fc31
data/Gemfile.lock CHANGED
@@ -8,7 +8,7 @@ GIT
8
8
  PATH
9
9
  remote: .
10
10
  specs:
11
- metanorma-standoc (1.1.8)
11
+ metanorma-standoc (1.1.9)
12
12
  asciidoctor (~> 1.5.7)
13
13
  concurrent-ruby
14
14
  html2doc (~> 0.8.0)
@@ -88,7 +88,7 @@ GEM
88
88
  algoliasearch
89
89
  iecbib (~> 0.2.1)
90
90
  iso-bib-item (~> 0.4.2)
91
- isodoc (0.9.22)
91
+ isodoc (0.9.23)
92
92
  asciimath
93
93
  html2doc (~> 0.8.6)
94
94
  htmlentities (~> 4.3.4)
@@ -117,8 +117,8 @@ GEM
117
117
  mime-types-data (3.2019.0331)
118
118
  mini_portile2 (2.3.0)
119
119
  nenv (0.3.0)
120
- nistbib (0.1.2)
121
- iso-bib-item (~> 0.4.2)
120
+ nistbib (0.1.3)
121
+ relaton-bib (~> 0.1.0)
122
122
  nokogiri (1.8.5)
123
123
  mini_portile2 (~> 2.3.0)
124
124
  notiffany (0.1.1)
@@ -126,7 +126,7 @@ GEM
126
126
  shellany (~> 0.0)
127
127
  optout (0.0.2)
128
128
  parallel (1.17.0)
129
- parser (2.6.2.1)
129
+ parser (2.6.3.0)
130
130
  ast (~> 2.4.0)
131
131
  powerpack (0.1.2)
132
132
  pry (0.12.2)
@@ -146,6 +146,8 @@ GEM
146
146
  iso-bib-item (~> 0.4.2)
147
147
  isobib (~> 0.4.0)
148
148
  nistbib (~> 0.1.1)
149
+ relaton-bib (0.1.1)
150
+ nokogiri (~> 1.8.4)
149
151
  roman-numerals (0.3.0)
150
152
  rspec (3.8.0)
151
153
  rspec-core (~> 3.8.0)
@@ -233,7 +233,7 @@ module Asciidoctor
233
233
  x.xpath("//requirement | //recommendation | //permission").each do |r|
234
234
  r.children.each do |e|
235
235
  unless e.element? && (Utils::reqt_subpart(e.name) ||
236
- %w(requirement recommnedation permission).include?(e.name))
236
+ %w(requirement recommendation permission).include?(e.name))
237
237
  t = Nokogiri::XML::Element.new("description", x)
238
238
  e.before(t)
239
239
  t.children = e.remove
@@ -43,7 +43,7 @@ module Asciidoctor
43
43
  def inline_anchor_link(node)
44
44
  contents = node.text
45
45
  contents = "" if node.target.gsub(%r{^mailto:}, "") == node.text
46
- attributes = { "target": node.target }
46
+ attributes = { "target": node.target, "alt": node.attr("title") }
47
47
  noko do |xml|
48
48
  xml.link **attr_code(attributes) do |l|
49
49
  l << contents
@@ -40,6 +40,9 @@
40
40
  <define name="standard-document">
41
41
  <element name="standard-document">
42
42
  <ref name="bibdata"/>
43
+ <optional>
44
+ <ref name="boilerplate"/>
45
+ </optional>
43
46
  <optional>
44
47
  <ref name="preface"/>
45
48
  </optional>
@@ -64,6 +67,42 @@
64
67
  </oneOrMore>
65
68
  </element>
66
69
  </define>
70
+ <define name="boilerplate">
71
+ <element name="boilerplate">
72
+ <optional>
73
+ <ref name="copyright-statement"/>
74
+ </optional>
75
+ <optional>
76
+ <ref name="license-statement"/>
77
+ </optional>
78
+ <optional>
79
+ <ref name="legal-statement"/>
80
+ </optional>
81
+ <optional>
82
+ <ref name="feedback-statement"/>
83
+ </optional>
84
+ </element>
85
+ </define>
86
+ <define name="copyright-statement">
87
+ <element name="copyright-statement">
88
+ <ref name="Content-Section"/>
89
+ </element>
90
+ </define>
91
+ <define name="license-statement">
92
+ <element name="license-statement">
93
+ <ref name="Content-Section"/>
94
+ </element>
95
+ </define>
96
+ <define name="legal-statement">
97
+ <element name="legal-statement">
98
+ <ref name="Content-Section"/>
99
+ </element>
100
+ </define>
101
+ <define name="feedback-statement">
102
+ <element name="feedback-statement">
103
+ <ref name="Content-Section"/>
104
+ </element>
105
+ </define>
67
106
  <define name="sections">
68
107
  <element name="sections">
69
108
  <oneOrMore>
@@ -533,6 +572,9 @@
533
572
  <attribute name="id">
534
573
  <data type="ID"/>
535
574
  </attribute>
575
+ <optional>
576
+ <attribute name="alt"/>
577
+ </optional>
536
578
  <optional>
537
579
  <ref name="tname"/>
538
580
  </optional>
@@ -868,6 +910,9 @@
868
910
  <attribute name="type">
869
911
  <ref name="ReferenceFormat"/>
870
912
  </attribute>
913
+ <optional>
914
+ <attribute name="alt"/>
915
+ </optional>
871
916
  <text/>
872
917
  </element>
873
918
  </define>
@@ -3,7 +3,8 @@ module Asciidoctor
3
3
  module Table
4
4
  def table_attrs(node)
5
5
  { id: Utils::anchor_or_uuid(node),
6
- headerrows: node.attr("headerrows") }
6
+ headerrows: node.attr("headerrows"),
7
+ alt: node.attr("alt") }
7
8
  end
8
9
 
9
10
  def table(node)
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Standoc
3
- VERSION = "1.1.8".freeze
3
+ VERSION = "1.1.9".freeze
4
4
  end
5
5
  end
@@ -84,12 +84,14 @@ RSpec.describe Asciidoctor::Standoc do
84
84
  mailto:fred@example.com
85
85
  http://example.com[]
86
86
  http://example.com[Link]
87
+ http://example.com[Link,title="tip"]
87
88
  INPUT
88
89
  #{BLANK_HDR}
89
90
  <sections>
90
91
  <p id="_">mailto:fred@example.com
91
92
  <link target="http://example.com"/>
92
- <link target="http://example.com">Link</link></p>
93
+ <link target="http://example.com">Link</link>
94
+ <link target="http://example.com" alt="tip">Link</link></p>
93
95
  </sections>
94
96
  </standard-document>
95
97
  OUTPUT
@@ -114,7 +114,7 @@ RSpec.describe Asciidoctor::Standoc do
114
114
  it "processes complex tables" do
115
115
  expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
116
116
  #{ASCIIDOC_BLANK_HDR}
117
- [cols="<,^,^,^,^",options="header,footer",headerrows=2]
117
+ [cols="<,^,^,^,^",options="header,footer",headerrows=2,alt="An extensive summary, and illustration, of tables"]
118
118
  .Maximum _permissible_ mass fraction of defects
119
119
  |===
120
120
  .2+|Defect 4+^| Maximum permissible mass fraction of defects in husked rice +
@@ -144,7 +144,7 @@ RSpec.describe Asciidoctor::Standoc do
144
144
  INPUT
145
145
  #{BLANK_HDR}
146
146
  <sections>
147
- <table id="_">
147
+ <table id="_" alt="An extensive summary, and illustration, of tables">
148
148
  <name>Maximum <em>permissible</em> mass fraction of defects</name>
149
149
  <thead>
150
150
  <tr>
@@ -51,15 +51,6 @@ RSpec.describe Metanorma::Standoc::Processor do
51
51
  <p class="zzSTDTitle1"></p>
52
52
  <div id="H"><h1>1.&#xA0; Terms and definitions</h1><p>For the purposes of this document,
53
53
  the following terms and definitions apply.</p>
54
- <p>ISO and IEC maintain terminological databases for use in
55
- standardization at the following addresses:</p>
56
-
57
- <ul>
58
- <li> <p>ISO Online browsing platform: available at
59
- <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
60
- <li> <p>IEC Electropedia: available at
61
- <a href="http://www.electropedia.org">http://www.electropedia.org</a>
62
- </p> </li> </ul>
63
54
  <h2 class="TermNum" id="J">1.1.</h2>
64
55
  <p class="Terms" style="text-align:left;">Term2</p>
65
56
  </div>
@@ -80,7 +71,7 @@ RSpec.describe Metanorma::Standoc::Processor do
80
71
  </sections>
81
72
  </iso-standard>
82
73
  INPUT
83
- expect(File.read("test.doc", encoding: "utf-8")).to match(/Electropedia/)
74
+ expect(File.read("test.doc", encoding: "utf-8")).to match(/Terms and definitions/)
84
75
  end
85
76
 
86
77
  it "generates XML from IsoDoc XML" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-standoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.8
4
+ version: 1.1.9
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-04-25 00:00:00.000000000 Z
11
+ date: 2019-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor