Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ignore columnbreak: https://github.com/metanorma/metanorma-bsi/issues… #539

Merged
merged 1 commit into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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