spec/isodoc/blocks_spec.rb in isodoc-0.9.23 vs spec/isodoc/blocks_spec.rb in isodoc-0.10.0

- old
+ new

@@ -241,10 +241,14 @@ </figure> <figure id="figure-B"> <pre>A &lt; B</pre> </figure> +<figure id="figure-C" unnumbered="true"> +<pre>A &lt; +B</pre> +</figure> </foreword></preface> </iso-standard> INPUT #{HTML_HDR} <br/> @@ -263,10 +267,15 @@ <div class="figure" id="figure-B"> <pre>A &lt; B</pre> <p class="FigureTitle" align="center">Figure 2</p> </div> + <div class="figure" id="figure-C"> +<pre>A &lt; +B</pre> +<p class="FigureTitle" align="center"/> +</div> </div> <p class="zzSTDTitle1"/> </div> </body> </html> @@ -370,10 +379,13 @@ <p>Hello</p> </example> <example id="samplecode2"> <p>Hello</p> </example> + <example id="samplecode3" unnumbered="true"> + <p>Hello</p> +</example> </foreword></preface> </iso-standard> INPUT #{HTML_HDR} <br/> @@ -385,10 +397,14 @@ </div> <div id="samplecode2" class="example"> <p class="example-title">EXAMPLE 2</p> <p>Hello</p> </div> + <div id="samplecode3" class="example"> + <p class="example-title">EXAMPLE</p> + <p>Hello</p> + </div> </div> <p class="zzSTDTitle1"/> </div> </body> </html> @@ -570,11 +586,11 @@ it "processes formulae" do expect(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT" <iso-standard xmlns="http://riboseinc.com/isoxml"> <preface><foreword> - <formula id="_be9158af-7e93-4ee2-90c5-26d31c181934"> + <formula id="_be9158af-7e93-4ee2-90c5-26d31c181934" unnumbered="true"> <stem type="AsciiMath">r = 1 %</stem> <dl id="_e4fe94fe-1cde-49d9-b1ad-743293b7e21d"> <dt> <stem type="AsciiMath">r</stem> </dt> @@ -584,27 +600,31 @@ </dl> <note id="_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0"> <p id="_511aaa98-4116-42af-8e5b-c87cdf5bfdc8">[durationUnits] is essentially a duration statement without the "P" prefix. "P" is unnecessary because between "G" and "U" duration is always expressed.</p> </note> </formula> + <formula id="_be9158af-7e93-4ee2-90c5-26d31c181935"> + <stem type="AsciiMath">r = 1 %</stem> + </formula> </foreword></preface> </iso-standard> INPUT #{HTML_HDR} <br/> <div> <h1 class="ForewordTitle">Foreword</h1> - <div id="_be9158af-7e93-4ee2-90c5-26d31c181934" class="formula"><p><span class="stem">(#(r = 1 %)#)</span>&#160; (1)</p></div><p>where</p><dl id="_e4fe94fe-1cde-49d9-b1ad-743293b7e21d"><dt> + <div id="_be9158af-7e93-4ee2-90c5-26d31c181934" class="formula"><p><span class="stem">(#(r = 1 %)#)</span></p></div><p>where</p><dl id="_e4fe94fe-1cde-49d9-b1ad-743293b7e21d"><dt> <span class="stem">(#(r)#)</span> </dt><dd> <p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the repeatability limit.</p> </dd></dl> <div id="_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0" class="Note"><p><span class="note_label">NOTE</span>&#160; [durationUnits] is essentially a duration statement without the "P" prefix. "P" is unnecessary because between "G" and "U" duration is always expressed.</p></div> - </div> + <div id="_be9158af-7e93-4ee2-90c5-26d31c181935" class="formula"><p><span class="stem">(#(r = 1 %)#)</span>&#160; (1)</p></div> + </div> <p class="zzSTDTitle1"/> </div> </body> </html> OUTPUT @@ -823,11 +843,11 @@ it "processes requirements" do expect(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT" <iso-standard xmlns="http://riboseinc.com/isoxml"> <preface><foreword> - <requirement id="_"> + <requirement id="A" unnumbered="true"> <title>A New Requirement</title> <label>/ogc/recommendation/wfs/2</label> <inherit>/ss/584/2015/level/1</inherit> <subject>user</subject> <description> @@ -851,11 +871,11 @@ <description> <p id="_">As for the measurement targets,</p> </description> <measurement-target exclude="false"> <p id="_">The measurement target shall be measured as:</p> - <formula id="_"> + <formula id="B"> <stem type="AsciiMath">r/1 = 0</stem> </formula> </measurement-target> <verification exclude="false"> <p id="_">The following code will be run for verification:</p> @@ -874,11 +894,11 @@ INPUT #{HTML_HDR} <br/> <div> <h1 class="ForewordTitle">Foreword</h1> - <div class="require"><p class="AdmonitionTitle">Requirement 1:<br/>/ogc/recommendation/wfs/2. A New Requirement</p> + <div class="require"><p class="AdmonitionTitle"><br/>/ogc/recommendation/wfs/2. A New Requirement</p> <div class="requirement-inherit">/ss/584/2015/level/1</div> <div class="requirement-description"> <p id="_">I recommend <i>this</i>.</p> </div> @@ -886,10 +906,10 @@ <div class="requirement-description"> <p id="_">As for the measurement targets,</p> </div> <div class="requirement-measurement-target"> <p id="_">The measurement target shall be measured as:</p> - <div id="_" class="formula"><p><span class="stem">(#(r/1 = 0)#)</span>&#160; (1)</p></div> + <div id="B" class="formula"><p><span class="stem">(#(r/1 = 0)#)</span>&#160; (1)</p></div> </div> <div class="requirement-verification"> <p id="_">The following code will be run for verification:</p>