metanorma-standoc 1.6.4 → 1.7.3

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.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +17 -0
  3. data/lib/asciidoctor/standoc/base.rb +8 -16
  4. data/lib/asciidoctor/standoc/basicdoc.rng +50 -3
  5. data/lib/asciidoctor/standoc/cleanup.rb +1 -1
  6. data/lib/asciidoctor/standoc/cleanup_block.rb +0 -8
  7. data/lib/asciidoctor/standoc/cleanup_boilerplate.rb +33 -20
  8. data/lib/asciidoctor/standoc/cleanup_inline.rb +3 -1
  9. data/lib/asciidoctor/standoc/cleanup_ref.rb +17 -24
  10. data/lib/asciidoctor/standoc/cleanup_terms.rb +4 -6
  11. data/lib/asciidoctor/standoc/converter.rb +4 -49
  12. data/lib/asciidoctor/standoc/front_contributor.rb +8 -4
  13. data/lib/asciidoctor/standoc/inline.rb +7 -5
  14. data/lib/asciidoctor/standoc/isodoc.rng +48 -3
  15. data/lib/asciidoctor/standoc/macros.rb +30 -61
  16. data/lib/asciidoctor/standoc/macros_terms.rb +82 -0
  17. data/lib/asciidoctor/standoc/ref.rb +12 -21
  18. data/lib/asciidoctor/standoc/section.rb +22 -20
  19. data/lib/asciidoctor/standoc/table.rb +12 -0
  20. data/lib/asciidoctor/standoc/term_lookup_cleanup.rb +86 -0
  21. data/lib/asciidoctor/standoc/utils.rb +2 -0
  22. data/lib/metanorma/standoc/version.rb +1 -1
  23. data/metanorma-standoc.gemspec +1 -2
  24. data/spec/asciidoctor-standoc/base_spec.rb +14 -8
  25. data/spec/asciidoctor-standoc/blocks_spec.rb +14 -9
  26. data/spec/asciidoctor-standoc/cleanup_sections_spec.rb +18 -13
  27. data/spec/asciidoctor-standoc/cleanup_spec.rb +75 -11
  28. data/spec/asciidoctor-standoc/inline_spec.rb +4 -5
  29. data/spec/asciidoctor-standoc/macros_lutaml_spec.rb +1 -1
  30. data/spec/asciidoctor-standoc/macros_plantuml_spec.rb +307 -0
  31. data/spec/asciidoctor-standoc/macros_spec.rb +258 -277
  32. data/spec/asciidoctor-standoc/refs_dl_spec.rb +4 -4
  33. data/spec/asciidoctor-standoc/section_spec.rb +155 -12
  34. data/spec/asciidoctor-standoc/table_spec.rb +146 -0
  35. data/spec/fixtures/diagram_definitions.lutaml +4 -4
  36. data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +49 -49
  37. data/spec/vcr_cassettes/isobib_get_123.yml +13 -13
  38. data/spec/vcr_cassettes/isobib_get_123_1.yml +25 -25
  39. data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +33 -33
  40. data/spec/vcr_cassettes/isobib_get_123_2001.yml +14 -14
  41. data/spec/vcr_cassettes/isobib_get_124.yml +14 -14
  42. data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +8 -8
  43. data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +71 -75
  44. metadata +7 -18
@@ -1,6 +1,6 @@
1
1
  module Asciidoctor
2
2
  module Standoc
3
- module Lists
3
+ module Refs
4
4
  def iso_publisher(t, code)
5
5
  code.sub(/ .*$/, "").split(/\//).each do |abbrev|
6
6
  t.contributor do |c|
@@ -70,8 +70,7 @@ module Asciidoctor
70
70
 
71
71
  def isorefmatches(xml, m)
72
72
  yr = norm_year(m[:year])
73
- ref = fetch_ref xml, m[:code], yr, title: m[:text], usrlbl: m[:usrlbl],
74
- lang: (@lang || :all)
73
+ ref = fetch_ref xml, m[:code], yr, title: m[:text], usrlbl: m[:usrlbl], lang: (@lang || :all)
75
74
  return use_my_anchor(ref, m[:anchor]) if ref
76
75
  xml.bibitem **attr_code(ref_attributes(m)) do |t|
77
76
  isorefrender1(t, m, yr)
@@ -105,8 +104,7 @@ module Asciidoctor
105
104
  def conditional_date(t, m, noyr)
106
105
  m.names.include?("year") and !m[:year].nil? and
107
106
  t.date(**{ type: "published" }) do |d|
108
- noyr and d.on "--" or
109
- set_date_range(d, norm_year(m[:year]))
107
+ noyr and d.on "--" or set_date_range(d, norm_year(m[:year]))
110
108
  end
111
109
  end
112
110
 
@@ -114,8 +112,7 @@ module Asciidoctor
114
112
  yr = norm_year(m[:year])
115
113
  hasyr = !yr.nil? && yr != "--"
116
114
  ref = fetch_ref xml, m[:code], hasyr ? yr : nil, all_parts: true,
117
- no_year: yr == "--", text: m[:text], usrlbl: m[:usrlbl],
118
- lang: (@lang || :all)
115
+ no_year: yr == "--", text: m[:text], usrlbl: m[:usrlbl], lang: (@lang || :all)
119
116
  return use_my_anchor(ref, m[:anchor]) if ref
120
117
  isorefmatches3_1(xml, m, yr, hasyr, ref)
121
118
  end
@@ -140,8 +137,7 @@ module Asciidoctor
140
137
  end
141
138
  docid(t, m[:usrlbl]) if m[:usrlbl]
142
139
  docid(t, /^\d+$/.match(code[:id]) ? "[#{code[:id]}]" : code[:id])
143
- code[:type] == "repo" and
144
- t.docidentifier code[:key], **{ type: "repository" }
140
+ code[:type] == "repo" and t.docidentifier code[:key], **{ type: "repository" }
145
141
  end
146
142
 
147
143
  def refitem_render(xml, m, code)
@@ -155,9 +151,8 @@ module Asciidoctor
155
151
  end
156
152
 
157
153
  MALFORMED_REF = "no anchor on reference, markup may be malformed: see "\
158
- "https://www.metanorma.com/author/topics/document-format/"\
159
- "bibliography/ , https://www.metanorma.com/author/iso/topics/markup/"\
160
- "#bibliographies".freeze
154
+ "https://www.metanorma.com/author/topics/document-format/bibliography/ , "\
155
+ "https://www.metanorma.com/author/iso/topics/markup/#bibliographies".freeze
161
156
 
162
157
  def analyse_ref_nofetch(ret)
163
158
  return ret unless m = /^nofetch\((?<id>.+)\)$/.match(ret[:id])
@@ -165,9 +160,8 @@ module Asciidoctor
165
160
  end
166
161
 
167
162
  def analyse_ref_repo_path(ret)
168
- return ret unless m =
169
- /^(?<type>repo|path):\((?<key>[^,]+),?(?<id>.*)\)$/.match(ret[:id])
170
- id = m[:id].empty? ? m[:key].sub(%r{^[^/]+/}, "") : m[:id]
163
+ return ret unless m = /^(?<type>repo|path):\((?<key>[^,]+),?(?<id>.*)\)$/.match(ret[:id])
164
+ id = m[:id].empty? ? m[:key].sub(%r{^[^/]+/}, "") : m[:id]
171
165
  ret.merge(id: id, type: m[:type], key: m[:key], nofetch: true)
172
166
  end
173
167
 
@@ -194,8 +188,7 @@ module Asciidoctor
194
188
  def refitem1(xml, item, m)
195
189
  code = analyse_ref_code(m[:code])
196
190
  unless code[:id] && code[:numeric] || code[:nofetch]
197
- ref = fetch_ref xml, code[:id],
198
- m.names.include?("year") ? m[:year] : nil, title: m[:text],
191
+ ref = fetch_ref xml, code[:id], m.names.include?("year") ? m[:year] : nil, title: m[:text],
199
192
  usrlbl: m[:usrlbl], lang: (@lang || :all)
200
193
  return use_my_anchor(ref, m[:anchor]) if ref
201
194
  end
@@ -212,8 +205,7 @@ module Asciidoctor
212
205
 
213
206
  ISO_REF = %r{^<ref\sid="(?<anchor>[^"]+)">
214
207
  \[(?<usrlbl>\([^)]+\))?(?<code>(ISO|IEC)[^0-9]*\s[0-9-]+|IEV)
215
- (:(?<year>[0-9][0-9-]+))?\]</ref>,?\s*
216
- (?<text>.*)$}xm
208
+ (:(?<year>[0-9][0-9-]+))?\]</ref>,?\s*(?<text>.*)$}xm
217
209
 
218
210
  ISO_REF_NO_YEAR = %r{^<ref\sid="(?<anchor>[^"]+)">
219
211
  \[(?<usrlbl>\([^)]+\))?(?<code>(ISO|IEC)[^0-9]*\s[0-9-]+):
@@ -239,8 +231,7 @@ module Asciidoctor
239
231
 
240
232
  def reference1(node, item, xml)
241
233
  matched, matched2, matched3 = reference1_matches(item)
242
- if matched3.nil? && matched2.nil? && matched.nil?
243
- refitem(xml, item, node)
234
+ if matched3.nil? && matched2.nil? && matched.nil? then refitem(xml, item, node)
244
235
  elsif !matched.nil? then isorefmatches(xml, matched)
245
236
  elsif !matched2.nil? then isorefmatches2(xml, matched2)
246
237
  elsif !matched3.nil? then isorefmatches3(xml, matched3)
@@ -14,8 +14,7 @@ module Asciidoctor
14
14
  end
15
15
 
16
16
  def sectiontype1(node)
17
- node&.attr("heading")&.downcase ||
18
- node.title.gsub(/<[^>]+>/, "").downcase
17
+ node&.attr("heading")&.downcase || node.title.gsub(/<[^>]+>/, "").downcase
19
18
  end
20
19
 
21
20
  def sectiontype(node, level = true)
@@ -47,15 +46,13 @@ module Asciidoctor
47
46
 
48
47
  def section_attributes(node)
49
48
  ret = { id: Utils::anchor_or_uuid(node),
50
- language: node.attributes["language"],
51
- script: node.attributes["script"],
52
- annex: (
53
- ((node.attr("style") == "appendix" || node.role == "appendix") &&
54
- node.level == 1) ? true : nil
55
- ),
56
- preface: (
57
- (node.role == "preface" || node.attr("style") == "preface") ?
58
- true : nil) }
49
+ language: node.attributes["language"],
50
+ script: node.attributes["script"],
51
+ number: node.attributes["number"],
52
+ annex: ( ((node.attr("style") == "appendix" || node.role == "appendix") &&
53
+ node.level == 1) ? true : nil),
54
+ preface: (
55
+ (node.role == "preface" || node.attr("style") == "preface") ? true : nil) }
59
56
  return ret unless node.attributes["change"]
60
57
  ret.merge(change: node.attributes["change"],
61
58
  path: node.attributes["path"],
@@ -105,9 +102,9 @@ module Asciidoctor
105
102
 
106
103
  def set_obligation(attrs, node)
107
104
  attrs[:obligation] = node.attributes.has_key?("obligation") ?
108
- node.attr("obligation") :
109
- node.parent.attributes.has_key?("obligation") ?
110
- node.parent.attr("obligation") : "normative"
105
+ node.attr("obligation") :
106
+ node.parent.attributes.has_key?("obligation") ?
107
+ node.parent.attr("obligation") : "normative"
111
108
  end
112
109
 
113
110
  def preamble(node)
@@ -187,18 +184,23 @@ module Asciidoctor
187
184
  @term_def = defs
188
185
  end
189
186
 
187
+ def terms_boilerplate_parse(attrs, xml, node)
188
+ defs = @term_def
189
+ @term_def = false
190
+ clause_parse(attrs.merge(type: "boilerplate"), xml, node)
191
+ @term_def = defs
192
+ end
193
+
190
194
  # subclause contains subclauses
191
195
  def term_def_subclause_parse(attrs, xml, node)
192
- node.role == "nonterm" and
193
- return nonterm_term_def_subclause_parse(attrs, xml, node)
196
+ node.role == "nonterm" and return nonterm_term_def_subclause_parse(attrs, xml, node)
197
+ node.role == "boilerplate" and return terms_boilerplate_parse(attrs, xml, node)
194
198
  st = sectiontype(node, false)
195
199
  return symbols_parse(attrs, xml, node) if @definitions
196
200
  sub = node.find_by(context: :section) { |s| s.level == node.level + 1 }
197
201
  sub.empty? || (return term_def_parse(attrs, xml, node, false))
198
- st == "symbols and abbreviated terms" and
199
- (return symbols_parse(attrs, xml, node))
200
- st == "terms and definitions" and
201
- return clause_parse(attrs, xml, node)
202
+ st == "symbols and abbreviated terms" and (return symbols_parse(attrs, xml, node))
203
+ st == "terms and definitions" and return clause_parse(attrs, xml, node)
202
204
  term_def_subclause_parse1(attrs, xml, node)
203
205
  end
204
206
 
@@ -17,6 +17,7 @@ module Asciidoctor
17
17
  @table_fn_number = "a"
18
18
  noko do |xml|
19
19
  xml.table **attr_code(table_attrs(node)) do |xml_table|
20
+ colgroup(node, xml_table)
20
21
  table_name(node, xml_table)
21
22
  %i(head body foot).reject do |tblsec|
22
23
  node.rows[tblsec].empty?
@@ -28,6 +29,17 @@ module Asciidoctor
28
29
 
29
30
  private
30
31
 
32
+ def colgroup(node, xml_table)
33
+ return if node.option? "autowidth"
34
+ cols = node&.attr("cols")&.split(/,/) or return
35
+ return unless cols.size > 1 and cols.all? { |c| /\d/.match(c) }
36
+ xml_table.colgroup do |cg|
37
+ node.columns.each do |col|
38
+ cg.col **{ width: "#{col.attr 'colpcwidth'}%" }
39
+ end
40
+ end
41
+ end
42
+
31
43
  def table_name(node, xml_table)
32
44
  if node.title?
33
45
  xml_table.name do |n|
@@ -0,0 +1,86 @@
1
+ # frozen_string_literal: true.
2
+
3
+ module Asciidoctor
4
+ module Standoc
5
+ # Intelligent term lookup xml modifier
6
+ # Lookup all `term` and `calause` tags and replace `termxref` tags with
7
+ # `xref`:target tag
8
+ class TermLookupCleanup
9
+ AUTOMATIC_GENERATED_ID_REGEXP = /\A_/
10
+ EXISTING_TERM_REGEXP = /\Aterm-/
11
+
12
+ attr_reader :xmldoc, :termlookup, :log
13
+
14
+ def initialize(xmldoc, log)
15
+ @xmldoc = xmldoc
16
+ @log = log
17
+ @termlookup = {}
18
+ end
19
+
20
+ def call
21
+ @termlookup = replace_automatic_generated_ids_terms
22
+ set_termxref_tags_target
23
+ end
24
+
25
+ private
26
+
27
+ def set_termxref_tags_target
28
+ xmldoc.xpath('//termxref').each do |node|
29
+ target = normalize_ref_id(node.text)
30
+ if termlookup[target].nil?
31
+ remove_missing_ref(node, target)
32
+ next
33
+ end
34
+ modify_ref_node(node, target)
35
+ end
36
+ end
37
+
38
+ def remove_missing_ref(node, target)
39
+ log.add('AsciiDoc Input', node,
40
+ %(Error: Term reference in `term[#{target}]` missing: \
41
+ "#{target}" is not defined in document))
42
+ term_name_node = node.previous.previous
43
+ term_name_node.remove
44
+ term_name_node.name = "strong"
45
+ term_name_node.children.first.content =
46
+ %(term "#{term_name_node.text}" not resolved)
47
+ node.add_previous_sibling(term_name_node)
48
+ node.remove
49
+ end
50
+
51
+ def modify_ref_node(node, target)
52
+ node.name = 'xref'
53
+ node['target'] = termlookup[target]
54
+ node.children.remove
55
+ node.remove_attribute('defaultref')
56
+ end
57
+
58
+ def replace_automatic_generated_ids_terms
59
+ xmldoc.xpath('//term').each.with_object({}) do |term_node, res|
60
+ normalize_id_and_memorize(term_node, res, './preferred')
61
+ end
62
+ end
63
+
64
+ def normalize_id_and_memorize(term_node, res_table, text_selector)
65
+ term_text = normalize_ref_id(term_node.at(text_selector).text)
66
+ unless AUTOMATIC_GENERATED_ID_REGEXP.match(term_node['id']).nil?
67
+ term_node['id'] = unique_text_id(term_text)
68
+ end
69
+ res_table[term_text] = term_node['id']
70
+ end
71
+
72
+ def normalize_ref_id(text)
73
+ text.downcase.gsub(/[[:space:]]/, '-')
74
+ end
75
+
76
+ def unique_text_id(text)
77
+ return "term-#{text}" if xmldoc.at("//*[@id = 'term-#{text}']").nil?
78
+ (1..Float::INFINITY).lazy.each do |index|
79
+ if xmldoc.at("//*[@id = 'term-#{text}-#{index}']").nil?
80
+ break("term-#{text}-#{index}")
81
+ end
82
+ end
83
+ end
84
+ end
85
+ end
86
+ end
@@ -31,8 +31,10 @@ module Asciidoctor
31
31
  docfile.nil? ? './' : Pathname.new(docfile).parent.to_s + '/'
32
32
  end
33
33
 
34
+ # TODO needs internationalisation
34
35
  def smartformat(n)
35
36
  n.gsub(/ --? /, "&#8201;&#8212;&#8201;").
37
+ gsub(/\'(\d\d)(?=[^\u2019\'\s<]+[’\'][\p{P}\p{Z}])([\p{P}\p{Z}])/, "\u2018\\1\\2").
36
38
  gsub(/--/, "&#8212;").smart_format.gsub(/</, "&lt;").gsub(/>/, "&gt;")
37
39
  end
38
40
 
@@ -19,6 +19,6 @@ module Metanorma
19
19
  end
20
20
 
21
21
  module Standoc
22
- VERSION = "1.6.4".freeze
22
+ VERSION = "1.7.3".freeze
23
23
  end
24
24
  end
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
28
28
 
29
29
  spec.add_dependency "asciidoctor", "~> 2.0.0"
30
30
  spec.add_dependency "ruby-jing"
31
- spec.add_dependency "isodoc", "~> 1.3.0"
31
+ spec.add_dependency "isodoc", "~> 1.4.2"
32
32
  spec.add_dependency "iev", "~> 0.2.1"
33
33
  spec.add_dependency "metanorma-plugin-datastruct"
34
34
  spec.add_dependency "metanorma-plugin-lutaml", "~> 0.2.1"
@@ -41,7 +41,6 @@ Gem::Specification.new do |spec|
41
41
  spec.add_dependency "mimemagic"
42
42
  spec.add_dependency "mathml2asciimath"
43
43
  spec.add_dependency "latexmath"
44
- spec.add_dependency "fontist", "~> 1.5.0"
45
44
 
46
45
  spec.add_development_dependency "byebug"
47
46
  spec.add_development_dependency "sassc", "2.4.0"
@@ -40,7 +40,7 @@ RSpec.describe Asciidoctor::Standoc do
40
40
  :docfile: test.adoc
41
41
  :nodoc:
42
42
  :novalid:
43
- :publisher: International Electrotechnical Commission,IETF,ISO
43
+ :publisher: International Electrotechnical Commission;IETF;ISO
44
44
  INPUT
45
45
  <standard-document xmlns='https://www.metanorma.org/ns/standoc' type='semantic' version='#{Metanorma::Standoc::VERSION}'>
46
46
  <bibdata type='standard'>
@@ -91,7 +91,7 @@ INPUT
91
91
  <stage>published</stage>
92
92
  </status>
93
93
  <copyright>
94
- <from>2020</from>
94
+ <from>#{Time.now.year}</from>
95
95
  <owner>
96
96
  <organization>
97
97
  <name>International Electrotechnical Commission</name>
@@ -100,7 +100,7 @@ INPUT
100
100
  </owner>
101
101
  </copyright>
102
102
  <copyright>
103
- <from>2020</from>
103
+ <from>#{Time.now.year}</from>
104
104
  <owner>
105
105
  <organization>
106
106
  <name>IETF</name>
@@ -108,7 +108,7 @@ INPUT
108
108
  </owner>
109
109
  </copyright>
110
110
  <copyright>
111
- <from>2020</from>
111
+ <from>#{Time.now.year}</from>
112
112
  <owner>
113
113
  <organization>
114
114
  <name>International Standards Organization</name>
@@ -181,6 +181,7 @@ OUTPUT
181
181
  :role: author
182
182
  :affiliation: Slate Rock and Gravel Company
183
183
  :affiliation_abbrev: SRG
184
+ :affiliation_subdiv: Hermeneutics Unit; Exegetical Subunit
184
185
  :address: 6 Rubble Way, Bedrock
185
186
  :contributor-uri: http://slate.example.com
186
187
  :phone: 123
@@ -191,13 +192,14 @@ OUTPUT
191
192
  :role_2: editor
192
193
  :affiliation_2: Rockhead and Quarry Cave Construction Company
193
194
  :affiliation_abbrev_2: RQCCC
195
+ :affiliation_subdiv_2: Hermeneutics Unit; Exegetical Subunit
194
196
  :address_2: 6A Rubble Way, + \\
195
197
  Bedrock
196
198
  :email_2: barney@rockhead.example.com
197
199
  :phone_2: 789
198
200
  :fax_2: 012
199
- :publisher: "Hanna Barbera", "Cartoon Network", "Ribose, Inc."
200
- :copyright-holder: "Ribose, Inc.", Hanna Barbera
201
+ :publisher: "Hanna Barbera"; "Cartoon Network"; "Ribose, Inc."
202
+ :copyright-holder: "Ribose, Inc."; Hanna Barbera
201
203
  :part-of: ABC
202
204
  :translated-from: DEF,GHI;JKL MNO,PQR
203
205
  :keywords: a, b, c
@@ -288,6 +290,8 @@ OUTPUT
288
290
  <organization>
289
291
  <name>Slate Rock and Gravel Company</name>
290
292
  <abbreviation>SRG</abbreviation>
293
+ <subdivision>Hermeneutics Unit</subdivision>
294
+ <subdivision>Exegetical Subunit</subdivision>
291
295
  <address>
292
296
  <formattedAddress>
293
297
  6 Rubble Way, Bedrock
@@ -312,6 +316,8 @@ OUTPUT
312
316
  <organization>
313
317
  <name>Rockhead and Quarry Cave Construction Company</name>
314
318
  <abbreviation>RQCCC</abbreviation>
319
+ <subdivision>Hermeneutics Unit</subdivision>
320
+ <subdivision>Exegetical Subunit</subdivision>
315
321
  <address>
316
322
  <formattedAddress>6A Rubble Way, <br/>Bedrock</formattedAddress>
317
323
  </address>
@@ -425,7 +431,7 @@ OUTPUT
425
431
  :tc-docnumber: 2000
426
432
  :language: el
427
433
  :script: Grek
428
- :publisher: IEC,IETF,ISO
434
+ :publisher: IEC;IETF;ISO
429
435
  :uri: A
430
436
  :xml-uri: B
431
437
  :html-uri: C
@@ -623,7 +629,7 @@ OUTPUT
623
629
  <stage>published</stage>
624
630
  </status>
625
631
  <copyright>
626
- <from>2020</from>
632
+ <from>#{Time.now.year}</from>
627
633
  <owner>
628
634
  <organization>
629
635
  <name>International Standards Organization</name>
@@ -318,7 +318,7 @@ RSpec.describe Asciidoctor::Standoc do
318
318
  <terms id="_" obligation="normative">
319
319
  <title>Terms and definitions</title>
320
320
  <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
321
- <term id="_">
321
+ <term id="term-term1">
322
322
  <preferred>Term1</preferred>
323
323
  <termnote id="_">
324
324
  <p id="_">This is a note</p>
@@ -340,7 +340,9 @@ RSpec.describe Asciidoctor::Standoc do
340
340
 
341
341
  NOTE: This is not a termnote
342
342
 
343
- EXAMPLE: This is not a termexample
343
+ ====
344
+ This is not a termexample
345
+ ====
344
346
 
345
347
  [.nonterm]
346
348
  === Term1
@@ -355,6 +357,9 @@ RSpec.describe Asciidoctor::Standoc do
355
357
  <note id='_'>
356
358
  <p id='_'>This is not a termnote</p>
357
359
  </note>
360
+ <example id='_'>
361
+ <p id='_'>This is not a termexample</p>
362
+ </example>
358
363
  <clause id="_" inline-header="false" obligation="normative">
359
364
  <title>Term1</title>
360
365
  <note id="_">
@@ -383,7 +388,7 @@ RSpec.describe Asciidoctor::Standoc do
383
388
  <sections>
384
389
  <terms id="_" obligation="normative"><title>Terms, definitions and symbols</title>
385
390
  <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
386
- <term id="_">
391
+ <term id="term-term1">
387
392
  <preferred>Term1</preferred>
388
393
  </term>
389
394
  <definitions id="_" obligation="normative" type="symbols">
@@ -528,7 +533,7 @@ RSpec.describe Asciidoctor::Standoc do
528
533
  <terms id="_" obligation="normative">
529
534
  <title>Terms and definitions</title>
530
535
  <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
531
- <term id="_">
536
+ <term id="term-term1">
532
537
  <preferred>Term1</preferred>
533
538
 
534
539
  <termexample id="ABC">
@@ -583,7 +588,7 @@ RSpec.describe Asciidoctor::Standoc do
583
588
  #{BLANK_HDR}
584
589
  <sections>
585
590
  <terms id="_" obligation="normative"><title>Terms, definitions and symbols</title>
586
- <p id="_">For the purposes of this document, the following terms and definitions apply.</p><term id="_">
591
+ <p id="_">For the purposes of this document, the following terms and definitions apply.</p><term id="term-term1">
587
592
  <preferred>Term1</preferred>
588
593
  </term>
589
594
  <definitions id="_" obligation="normative" type="symbols">
@@ -972,7 +977,7 @@ RSpec.describe Asciidoctor::Standoc do
972
977
  <terms id="_" obligation="normative">
973
978
  <title>Terms and definitions</title><p id="_">For the purposes of this document,
974
979
  the following terms and definitions apply.</p>
975
- <term id="_">
980
+ <term id="term-term1">
976
981
  <preferred>Term1</preferred>
977
982
  <termsource status="identical">
978
983
  <origin bibitemid="ISO2191" type="inline" citeas="">
@@ -982,7 +987,7 @@ RSpec.describe Asciidoctor::Standoc do
982
987
  </origin>
983
988
  </termsource>
984
989
  </term>
985
- <term id='_'>
990
+ <term id='term-term2'>
986
991
  <preferred>Term2</preferred>
987
992
  <definition>
988
993
  <p id='_'>Definition</p>
@@ -1032,7 +1037,7 @@ RSpec.describe Asciidoctor::Standoc do
1032
1037
  <title>Terms and definitions</title>
1033
1038
  <p id="_">For the purposes of this document,
1034
1039
  the following terms and definitions apply.</p>
1035
- <term id="_">
1040
+ <term id="term-term1">
1036
1041
  <preferred>Term1</preferred>
1037
1042
  <termsource status="modified">
1038
1043
  <origin bibitemid="ISO2191" type="inline" citeas="">
@@ -1045,7 +1050,7 @@ RSpec.describe Asciidoctor::Standoc do
1045
1050
  </modification>
1046
1051
  </termsource>
1047
1052
  </term>
1048
- <term id='_'>
1053
+ <term id='term-term2'>
1049
1054
  <preferred>Term2</preferred>
1050
1055
  <definition>
1051
1056
  <p id='_'>Definition</p>