Skip to content

Commit

Permalink
rspec
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis committed Oct 23, 2023
1 parent ef91836 commit 4059605
Show file tree
Hide file tree
Showing 7 changed files with 171 additions and 161 deletions.
10 changes: 6 additions & 4 deletions lib/metanorma/jis/converter.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
require "asciidoctor"
require "metanorma-iso"
require_relative "./front"
require_relative "./validate"
require_relative "./cleanup"
require_relative "front"
require_relative "validate"
require_relative "cleanup"

module Metanorma
module JIS
Expand Down Expand Up @@ -74,7 +74,9 @@ def presentation_xml_converter(node)
if node.nil?
IsoDoc::JIS::PresentationXMLConvert.new({})
else
IsoDoc::JIS::PresentationXMLConvert.new(doc_extract_attributes(node))
IsoDoc::JIS::PresentationXMLConvert
.new(doc_extract_attributes(node)
.merge(output_formats: ::Metanorma::JIS::Processor.new.output_formats))
end
end
end
Expand Down
10 changes: 9 additions & 1 deletion lib/metanorma/jis/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.2.5 -->
<!-- VERSION v1.2.6 -->
<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 Expand Up @@ -1013,6 +1013,14 @@
</oneOrMore>
</element>
</define>
<define name="BasicBlock" combine="choice">
<ref name="columnbreak"/>
</define>
<define name="columnbreak">
<element name="columnbreak">
<empty/>
</element>
</define>
<define name="MultilingualRenderingType">
<choice>
<value>common</value>
Expand Down
1 change: 1 addition & 0 deletions lib/metanorma/jis/processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def version
end

def output(xml, inname, outname, format, options = {})
options_preprocess(options)
case format
when :html
IsoDoc::JIS::HtmlConvert.new(options).convert(inname, xml, nil, outname)
Expand Down
1 change: 0 additions & 1 deletion spec/isodoc/blocks_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@
<div id="figure-C" class="figure">
<pre>A &lt;
B</pre>
<p class="FigureTitle" style="text-align:center;"/>
</div>
</div>
<br/>
Expand Down
76 changes: 38 additions & 38 deletions spec/vcr_cassettes/isobib_123_dated.yml

Large diffs are not rendered by default.

118 changes: 59 additions & 59 deletions spec/vcr_cassettes/isobib_123_mix_dated.yml

Large diffs are not rendered by default.

116 changes: 58 additions & 58 deletions spec/vcr_cassettes/isobib_123_undated.yml

Large diffs are not rendered by default.

0 comments on commit 4059605

Please sign in to comment.