metanorma-iso 2.7.8 → 2.7.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -36,17 +36,6 @@ module IsoDoc
36
36
 
37
37
  # subclauses are not prefixed with "Clause"
38
38
  # retaining subtype for the semantics
39
- def section_names1(clause, num, level)
40
- @anchors[clause["id"]] =
41
- { label: num, level: level, xref: num, subtype: "clause" }
42
- i = Counter.new(0, prefix: "#{num}.")
43
- clause.xpath(ns("./clause | ./terms | ./term | ./definitions | " \
44
- "./references"))
45
- .each do |c|
46
- section_names1(c, i.increment(c).print, level + 1)
47
- end
48
- end
49
-
50
39
  def section_name_anchors(clause, num, level)
51
40
  if clause["type"] == "section"
52
41
  @anchors[clause["id"]] =
@@ -54,8 +43,10 @@ module IsoDoc
54
43
  xref: l10n("#{@labels['section']} #{num}"),
55
44
  title: clause_title(clause), level: level, type: "clause",
56
45
  elem: @labels["section"] }
57
- else super
58
- end
46
+ elsif level > 1
47
+ @anchors[clause["id"]] =
48
+ { label: num, level: level, xref: num, subtype: "clause" }
49
+ else super end
59
50
  end
60
51
 
61
52
  def annex_name_anchors1(clause, num, level)