metanorma-un 0.3.1 → 0.3.2

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: ca6423742e73f915cfe6fed182931dde2237f2d7b5d23bf2ce356113ec4c4ebb
4
- data.tar.gz: 256e00b7357d4f839f48690132f20ba0265c1c13ccd2e4f49a7d5135c01109f8
3
+ metadata.gz: 9434eaf6a8d055ea8eb6fd49dbd53948f5421208780084497f9f525368c955d6
4
+ data.tar.gz: d4a1b4904ae6fdc1c2affeea0d5f459f31538a818277da8932934f7aa0336470
5
5
  SHA512:
6
- metadata.gz: 17758698e986a248570200ff0802717ecc0ab688136c2b76e9cf610fd65d375d04ad4ec436a3ce998080507a106dcdefaed7b4c0119b6525595edae0865ec549
7
- data.tar.gz: 2f00c75f5cbfbea77427026ef8b9583eb3709708ea83522dd5ef272b728763f8aad5e5b0f7483d9a55fedf53caf1fb41e0670431b2cc4055facf60b4d2608a13
6
+ metadata.gz: 07451413d407acafa990d3c5f08ffc31fe82026f9978916a4c41af6a25428bfa643ec41d7863232b14e813cb6d160b072526d93022ac7119e3b36b9acd56fd4c
7
+ data.tar.gz: 5d036e3bc7b239cad032250d624dc401a6ff6a138a780fc535b683752254b33fb48e88d782d8949c9b98ae82c81e78fc0f25faf5572ce8c87d3fa2db73bb5f0b
@@ -33,10 +33,16 @@ module IsoDoc
33
33
  MIDDLE_CLAUSE = "//clause[parent::sections]".freeze
34
34
 
35
35
  def initial_anchor_names(d)
36
- preface_names(d.at(ns("//abstract")))
36
+ preface_names(d.at(ns("//preface/abstract")))
37
37
  preface_names(d.at(ns("//foreword")))
38
38
  preface_names(d.at(ns("//introduction")))
39
- sequential_asset_names(d.xpath(ns("//foreword | //introduction")))
39
+ d.xpath(ns("//preface/clause")).each do |c|
40
+ preface_names(c)
41
+ end
42
+ preface_names(d.at(ns("//acknowledgements")))
43
+ sequential_asset_names(
44
+ d.xpath(ns("//preface/abstract | //foreword | //introduction | "\
45
+ "//preface/clause | //acknowledgements")))
40
46
  middle_section_asset_names(d)
41
47
  clause_names(d, 0)
42
48
  termnote_anchor_names(d)
@@ -213,13 +219,12 @@ module IsoDoc
213
219
  end
214
220
 
215
221
  def inline_header_title(out, node, c1)
216
- title = c1&.content || ""
217
222
  out.span **{ class: "zzMoveToFollowing" } do |s|
218
223
  if lbl = anchor(node['id'], :label)
219
224
  s << "#{lbl}. " unless @suppressheadingnumbers
220
225
  insert_tab(s, 1)
221
226
  end
222
- s << "#{title} "
227
+ c1&.children&.each { |c2| parse(c2, s) }
223
228
  end
224
229
  end
225
230
  end
@@ -65,6 +65,8 @@ module IsoDoc
65
65
  abstract docxml, div3
66
66
  foreword docxml, div3
67
67
  introduction docxml, div3
68
+ preface docxml, div3
69
+ acknowledgements docxml, div3
68
70
  middle docxml, div3
69
71
  footnotes div3
70
72
  comments div3
@@ -72,6 +72,8 @@ module IsoDoc
72
72
  abstract docxml, div3
73
73
  foreword docxml, div3
74
74
  introduction docxml, div3
75
+ preface docxml, div3
76
+ acknowledgements docxml, div3
75
77
  middle docxml, div3
76
78
  footnotes div3
77
79
  comments div3
@@ -71,6 +71,8 @@ module IsoDoc
71
71
  abstract docxml, div2
72
72
  foreword docxml, div2
73
73
  introduction docxml, div2
74
+ preface docxml, div2
75
+ acknowledgements docxml, div2
74
76
  div2.p { |p| p << "&nbsp;" } # placeholder
75
77
  end
76
78
  section_break(body)
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module UN
3
- VERSION = "0.3.1"
3
+ VERSION = "0.3.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-un
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-02-17 00:00:00.000000000 Z
11
+ date: 2020-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities