metanorma-gb 1.3.3 → 1.3.4

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: 1c27e01906bc7f45a2522a6dadb628c21f42fe739e4d021b74cf24608206e139
4
- data.tar.gz: 42d290af815bcdff9abe51617e5155cd998ba5bc4cc86612bcd7aa1ce21b8280
3
+ metadata.gz: aa05f8bf06951b8946e1afd845994998671639afeee7d8b1d43440cd7018482f
4
+ data.tar.gz: 16d11618fee5ea6be6f1fe005a21d12ae139a89fc2b0da08dc42f1cb33267d6d
5
5
  SHA512:
6
- metadata.gz: 290f59692da3555e3931c032699597d6b94ab1e576ad3cd36926d3dee736581eb9602c2a50e7cd6f996693c7d76d89e7a7c3e99dc68a16c4a9d7ee29a7d83b98
7
- data.tar.gz: 5c34001ed6f8d57856ed1fda99c47a8ee0d2db7d7fcd872aa0d77ce31bd6d1fd085744ac052f2f3ecf2c4413546bd814b70f045422b86e66655c02036957b3f5
6
+ metadata.gz: 1645f269ef3e8467e699e4ea8800e3ae62a5b816ae4dbbe3c157bfe773d6414a2b46f3eaf34afe341a72fc143237279ac1db8793ce3f97f0c828f9f832f818fb
7
+ data.tar.gz: 223e4d2f52db3c8389f7ecd062504b123505a93bc169c981227f10ea1f1cc5c24c1993e8e7c95cb198c8fb96f5e6bc11befc7f3dd0e38bd48c7959565e691955
@@ -0,0 +1,27 @@
1
+ # Auto-generated !!! Do not edit it manually
2
+ # use ci-master https://github.com/metanorma/metanorma-build-scripts
3
+ name: macos
4
+
5
+ on: [push]
6
+
7
+ jobs:
8
+ test-macos:
9
+ name: Test on Ruby ${{ matrix.ruby }} macOS
10
+ runs-on: macos-latest
11
+ strategy:
12
+ matrix:
13
+ ruby: [ '2.6', '2.5', '2.4' ]
14
+ steps:
15
+ - uses: actions/checkout@master
16
+ - name: Use Ruby
17
+ uses: actions/setup-ruby@v1
18
+ with:
19
+ ruby-version: ${{ matrix.ruby }}
20
+ architecture: 'x64'
21
+ - name: Update gems
22
+ run: |
23
+ sudo gem install bundler -v "~> 2" --force
24
+ bundle install --jobs 4 --retry 3
25
+ - name: Run specs
26
+ run: |
27
+ bundle exec rake
@@ -0,0 +1,27 @@
1
+ # Auto-generated !!! Do not edit it manually
2
+ # use ci-master https://github.com/metanorma/metanorma-build-scripts
3
+ name: ubuntu
4
+
5
+ on: [push]
6
+
7
+ jobs:
8
+ test-linux:
9
+ name: Test on Ruby ${{ matrix.ruby }} Ubuntu
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ matrix:
13
+ ruby: [ '2.6', '2.5', '2.4' ]
14
+ steps:
15
+ - uses: actions/checkout@master
16
+ - name: Use Ruby
17
+ uses: actions/setup-ruby@v1
18
+ with:
19
+ ruby-version: ${{ matrix.ruby }}
20
+ architecture: 'x64'
21
+ - name: Update gems
22
+ run: |
23
+ gem install bundler -v "~> 2"
24
+ bundle install --jobs 4 --retry 3
25
+ - name: Run specs
26
+ run: |
27
+ bundle exec rake
@@ -0,0 +1,30 @@
1
+ # Auto-generated !!! Do not edit it manually
2
+ # use ci-master https://github.com/metanorma/metanorma-build-scripts
3
+ name: windows
4
+
5
+ on: [push]
6
+
7
+ jobs:
8
+ test-windows:
9
+ name: Test on Ruby ${{ matrix.ruby }} Windows
10
+ runs-on: windows-latest
11
+ strategy:
12
+ matrix:
13
+ ruby: [ '2.6', '2.5', '2.4' ]
14
+ steps:
15
+ - uses: actions/checkout@master
16
+ - name: Use Ruby
17
+ uses: actions/setup-ruby@v1
18
+ with:
19
+ ruby-version: ${{ matrix.ruby }}
20
+ architecture: 'x64'
21
+ - name: Update gems
22
+ shell: pwsh
23
+ run: |
24
+ gem install bundler -v "~> 2"
25
+ bundle config --local path vendor/bundle
26
+ bundle update
27
+ bundle install --jobs 4 --retry 3
28
+ - name: Run specs
29
+ run: |
30
+ bundle exec rake
@@ -443,6 +443,9 @@
443
443
  <optional>
444
444
  <attribute name="subsequence"/>
445
445
  </optional>
446
+ <optional>
447
+ <ref name="tname"/>
448
+ </optional>
446
449
  <oneOrMore>
447
450
  <choice>
448
451
  <ref name="formula"/>
@@ -44,6 +44,27 @@
44
44
  </oneOrMore>
45
45
  </element>
46
46
  </define>
47
+ <define name="references">
48
+ <element name="references">
49
+ <optional>
50
+ <attribute name="id">
51
+ <data type="ID"/>
52
+ </attribute>
53
+ </optional>
54
+ <optional>
55
+ <ref name="section-title"/>
56
+ </optional>
57
+ <zeroOrMore>
58
+ <ref name="BasicBlock"/>
59
+ </zeroOrMore>
60
+ <zeroOrMore>
61
+ <ref name="bibitem"/>
62
+ <zeroOrMore>
63
+ <ref name="note"/>
64
+ </zeroOrMore>
65
+ </zeroOrMore>
66
+ </element>
67
+ </define>
47
68
  </include>
48
69
  <define name="standard-document">
49
70
  <element name="standard-document">
@@ -216,11 +216,21 @@ module IsoDoc
216
216
  end
217
217
  end
218
218
 
219
+ def example_span_label(node, div, name)
220
+ n = get_anchors[node["id"]]
221
+ div.span **{ class: "example_label" } do |p|
222
+ lbl = (n.nil? || n[:label].nil? || n[:label].empty?) ? @example_lbl :
223
+ l10n("#{@example_lbl} #{n[:label]}")
224
+ p << l10n(lbl + ":")
225
+ name and !lbl.nil? and p << "&nbsp;&mdash; "
226
+ name and name.children.each { |n| parse(n, div) }
227
+ end
228
+ end
229
+
219
230
  def example_p_parse(node, div)
231
+ name = node&.at(ns("./name"))&.remove
220
232
  div.p do |p|
221
- p.span **{ class: "example_label" } do |s|
222
- s << example_label(node)
223
- end
233
+ example_span_label(node, p, name)
224
234
  insert_tab(p, 1)
225
235
  node.first_element_child.children.each { |n| parse(n, p) }
226
236
  end
@@ -229,17 +239,24 @@ module IsoDoc
229
239
 
230
240
  def example_parse1(node, div)
231
241
  div.p do |p|
232
- p.span **{ class: "example_label" } do |s|
233
- s << example_label(node)
234
- end
242
+ example_span_label(node, p, node.at(ns("./name")))
235
243
  insert_tab(p, 1)
236
244
  end
237
- node.children.each { |n| parse(n, div) }
245
+ node.children.each { |n| parse(n, div) unless n.name == "name" }
246
+ end
247
+
248
+ def node_begins_with_para(node)
249
+ node.elements.each do |e|
250
+ next if e.name == "name"
251
+ return true if e.name == "p"
252
+ return false
253
+ end
254
+ false
238
255
  end
239
256
 
240
257
  def example_parse(node, out)
241
258
  out.div **{ id: node["id"], class: "example" } do |div|
242
- if node.first_element_child.name == "p"
259
+ if node_begins_with_para(node)
243
260
  example_p_parse(node, div)
244
261
  else
245
262
  example_parse1(node, div)
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Gb
3
- VERSION = "1.3.3"
3
+ VERSION = "1.3.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-gb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.3
4
+ version: 1.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-09-27 00:00:00.000000000 Z
11
+ date: 2019-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-iso
@@ -247,17 +247,18 @@ executables: []
247
247
  extensions: []
248
248
  extra_rdoc_files: []
249
249
  files:
250
+ - ".github/workflows/macos.yml"
251
+ - ".github/workflows/ubuntu.yml"
252
+ - ".github/workflows/windows.yml"
250
253
  - ".gitignore"
251
254
  - ".hound.yml"
252
255
  - ".oss-guides.rubocop.yml"
253
256
  - ".rubocop.yml"
254
- - ".travis.yml"
255
257
  - CODE_OF_CONDUCT.md
256
258
  - Gemfile
257
259
  - LICENSE
258
260
  - README.adoc
259
261
  - Rakefile
260
- - appveyor.yml
261
262
  - asciidoctor-gb.gemspec.old
262
263
  - bin/console
263
264
  - bin/rspec
data/.travis.yml DELETED
@@ -1,18 +0,0 @@
1
- # Auto-generated !!! Do not edit it manually
2
- # use ci-master https://github.com/metanorma/metanorma-build-scripts
3
- language: ruby
4
- cache: bundler
5
- os:
6
- - linux
7
- - osx
8
- rvm:
9
- - 2.6
10
- - 2.5
11
- - 2.4
12
- - ruby-head
13
- before_install:
14
- - gem install bundler -v "~> 2"
15
- - bundle update
16
- matrix:
17
- allow_failures:
18
- - rvm: ruby-head
data/appveyor.yml DELETED
@@ -1,37 +0,0 @@
1
- # Auto-generated !!! Do not edit it manually
2
- # use ci-master https://github.com/metanorma/metanorma-build-scripts
3
- version: '{build}'
4
-
5
- cache:
6
- - vendor/bundle
7
-
8
- environment:
9
- matrix:
10
- - RUBY_VERSION: 26
11
- - RUBY_VERSION: 25
12
- - RUBY_VERSION: 24
13
- - RUBY_VERSION: _trunk
14
-
15
- matrix:
16
- allow_failures:
17
- - RUBY_VERSION: _trunk
18
-
19
- install:
20
- - ps: . { iwr -useb https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/appveyor.ps1 } | iex
21
- - refreshenv
22
-
23
- build_script:
24
- - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
25
- - set GIT_TERMINAL_PROMPT=0
26
- - gem install bundler -v "~> 2"
27
- - bundle config --local path vendor/bundle
28
- - bundle update
29
- - bundle install
30
-
31
- before_test:
32
- - ruby -v
33
- - gem -v
34
- - bundle -v
35
-
36
- test_script:
37
- - bundle exec rake