Skip to content

Commit

Permalink
allow multiple sections of same type if specified through heading att…
Browse files Browse the repository at this point in the history
…ribute: #939
  • Loading branch information
opoudjis committed Nov 10, 2024
1 parent e922b7c commit 5a14707
Show file tree
Hide file tree
Showing 5 changed files with 785 additions and 657 deletions.
1 change: 0 additions & 1 deletion lib/metanorma/standoc/blocks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ def pass(node)
noko do |xml|
xml.passthrough **attr_code(formats:
node.attr("format") || "metanorma") do |p|
# p << @c.encode(@c.decode(node.content), :basic, :hexadecimal)
p << @c.encode(node.content, :basic, :hexadecimal)
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/metanorma/standoc/isodoc.rng
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
these elements; we just want one namespace for any child grammars
of this.
-->
<!-- VERSION v1.3.4 -->
<!-- VERSION v1.4.0 -->
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<include href="reqt.rng"/>
<include href="basicdoc.rng">
Expand Down
2 changes: 1 addition & 1 deletion lib/metanorma/standoc/section.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def sectiontype(node, level = true)
ret1 = preface_main_filter(sectiontype_streamline(ret), node)
ret1 == "symbols and abbreviated terms" and return ret1
!level || node.level == 1 || node.attr("heading") or return nil
@seen_headers.include? ret and return nil
!node.attr("heading") && @seen_headers.include?(ret) and return nil
@seen_headers << ret unless ret1.nil?
@seen_headers_canonical << ret1 unless ret1.nil?
ret1
Expand Down
Loading

0 comments on commit 5a14707

Please sign in to comment.