diff --git a/lib/isodoc/iso/xref_section.rb b/lib/isodoc/iso/xref_section.rb
index a7b8a385..8a13a515 100644
--- a/lib/isodoc/iso/xref_section.rb
+++ b/lib/isodoc/iso/xref_section.rb
@@ -53,8 +53,8 @@ def section_name_anchors(clause, num, level)
end
def annex_name_anchors1(clause, num, level)
- ret = { label: num , #semx(clause, num),
- level: level, subtype: "annex" }
+ level == 1 and return annex_name_anchors(clause, num, level)
+ ret = { label: num, level: level, subtype: "annex" }
ret2 = if level == 2
xref = labelled_autonum(@labels["clause"], num)
{ xref:, # l10n("#{@labels['clause']} #{num}"),
@@ -65,15 +65,6 @@ def annex_name_anchors1(clause, num, level)
@anchors[clause["id"]] = ret.merge(ret2)
end
- def annex_names1(clause, parentnum, num, level)
- lbl = clause_number_semx(parentnum, clause, num)
- annex_name_anchors1(clause, lbl, level)
- i = clause_counter(0)
- clause.xpath(ns("./clause | ./references")).each do |c|
- annex_names1(c, lbl, i.increment(c).print, level + 1)
- end
- end
-
def appendix_names1(clause, parentnum, num, level, container)
#num = labelled_autonum(@labels["appendix"], num)
num = clause_number_semx(parentnum, clause, num)
diff --git a/spec/isodoc/xref_spec.rb b/spec/isodoc/xref_spec.rb
index edecac9f..761c450a 100644
--- a/spec/isodoc/xref_spec.rb
+++ b/spec/isodoc/xref_spec.rb
@@ -1117,6 +1117,9 @@