lib/asciidoctor/nist/converter.rb in metanorma-nist-1.0.6 vs lib/asciidoctor/nist/converter.rb in metanorma-nist-1.0.7
- old
+ new
@@ -149,39 +149,15 @@
else
super
end
end
- def section(node)
- a = section_attributes(node)
- noko do |xml|
- case sectiontype(node)
- #when "normative references" then norm_ref_parse(a, xml, node)
- when "terms and definitions"
- if node.attr("style") == "appendix" && node.level == 1
- @term_def = true
- terms_annex_parse(a, xml, node)
- @term_def = false
- else
- clause_parse(a, xml, node)
- end
- when "acknowledgements"
- acknowledgements_parse(a, xml, node)
- else
- if @term_def
- term_def_subclause_parse(a, xml, node)
- elsif @biblio then bibliography_parse(a, xml, node)
- elsif node.attr("style") == "bibliography"
- bibliography_parse(a, xml, node)
- elsif node.attr("style") == "abstract"
- abstract_parse(a, xml, node)
- elsif node.attr("style") == "appendix" && node.level == 1
- annex_parse(a, xml, node)
- else
- clause_parse(a, xml, node)
- end
- end
- end.join("\n")
+ def term_def_parse(attrs, xml, node, toplevel)
+ if node.attr("style") == "appendix" && node.level == 1
+ terms_annex_parse(attrs, xml, node)
+ else
+ clause_parse(attrs, xml, node)
+ end
end
def bibliography_parse(a, xml, node)
@biblioasappendix and node.level == 1 and
return bibliography_annex_parse(a, xml, node)