Skip to content

Commit

Permalink
Merge pull request #316 from metanorma/fix/recursive-prefix-container
Browse files Browse the repository at this point in the history
allow recursive container prefixes for cross-references: https://gith…
  • Loading branch information
opoudjis authored Nov 28, 2023
2 parents cc996f3 + 454ebe2 commit 3e32264
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/isodoc/ieee/xref.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ def middle_section_asset_names(doc)
end
end

def sequential_formula_names(clause)
def sequential_formula_names(clause, container: false)
c = Counter.new
clause.xpath(ns(".//formula")).noblank.each do |t|
@anchors[t["id"]] = anchor_struct(
c.increment(t).print, nil,
c.increment(t).print, container ? t : nil,
t["inequality"] ? @labels["inequality"] : @labels["formula"],
"formula", t["unnumbered"]
)
Expand Down
6 changes: 3 additions & 3 deletions spec/isodoc/section_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@
OUTPUT
html = <<~OUTPUT
<div id='boilerplate-participants'>
<h1 class='IntroTitle'>Participants</h1>
<h1 class='IntroTitle' id="_">Participants</h1>
<div id='boilerplate-participants-wg'>
<p id='_'>
At the time this draft Standard was completed, the Working Group had the
Expand Down Expand Up @@ -1136,8 +1136,8 @@
.to be_equivalent_to xmlpp(presxml)
IsoDoc::IEEE::HtmlConvert.new({}).convert("test", presxml, false)
expect(File.exist?("test.html")).to be true
expect(xmlpp(Nokogiri::XML(File.read("test.html"))
.at("//div[@id = 'boilerplate-participants']").to_xml))
expect(strip_guid(xmlpp(Nokogiri::XML(File.read("test.html"))
.at("//div[@id = 'boilerplate-participants']").to_xml)))
.to be_equivalent_to xmlpp(html)
IsoDoc::IEEE::WordConvert.new({}).convert("test", presxml, false)
expect(File.exist?("test.doc")).to be true
Expand Down

0 comments on commit 3e32264

Please sign in to comment.