Skip to content

Commit

Permalink
Merge pull request #539 from metanorma/features/columnbreak
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis authored Oct 17, 2023
2 parents 5f5285d + 0bf7ace commit 328b998
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/isodoc/function/blocks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ def source_parse(node, out)
end
end
end

def columnbreak_parse(node, out); end
end
end
end
1 change: 1 addition & 0 deletions lib/isodoc/function/to_word_html.rb
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ def parse(node, out)
when "variant-title" then variant_title(node, out)
when "span" then span_parse(node, out)
when "location" then location_parse(node, out)
when "columnbreak" then columnbreak_parse(node, out)
else error_parse(node, out)
end
end
Expand Down
27 changes: 27 additions & 0 deletions spec/isodoc/blocks_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1872,6 +1872,33 @@
.convert("test", input, true)))).to be_equivalent_to xmlpp(output)
end

it "ignores columnbreak" do
input = <<~INPUT
<iso-standard xmlns="http://riboseinc.com/isoxml">
<preface>
<clause type="toc" id="_toc" displayorder="1">
<title depth="1">Table of contents</title>
<columnbreak/>
</clause>
<foreword displayorder="2">
<passthrough format="doc,rfc">&lt;A&gt;</passthrough>
</foreword></preface>
</iso-standard>
INPUT
output = <<~OUTPUT
#{HTML_HDR}
<br/>
<div>
<h1 class='ForewordTitle'>Foreword</h1>
</div>
</div>
</body>
</html>
OUTPUT
expect(xmlpp(strip_guid(IsoDoc::HtmlConvert.new({})
.convert("test", input, true)))).to be_equivalent_to xmlpp(output)
end

it "processes toc" do
input = <<~INPUT
<standard-document xmlns='https://www.metanorma.org/ns/standoc' type='semantic' version='1.10.2'>
Expand Down

0 comments on commit 328b998

Please sign in to comment.