lib/isodoc/iho/xref.rb in metanorma-iho-0.2.2 vs lib/isodoc/iho/xref.rb in metanorma-iho-0.2.3

- old
+ new

@@ -57,8 +57,18 @@ anchor_struct(i + 1, nil, @labels["appendix"], "clause") @anchors[c["id"]][:level] = 2 @anchors[c["id"]][:container] = clause["id"] end end + + def section_names1(clause, num, level) + @anchors[clause["id"]] = + { label: num, level: level, xref: l10n("#{@labels["subclause"]} #{num}"), + type: "clause" } + clause.xpath(ns(SUBCLAUSES)). + each_with_index do |c, i| + section_names1(c, "#{num}.#{i + 1}", level + 1) + end + end end end end