Skip to content

Commit

Permalink
/~https://github.com/metanorma/isodoc/issues/617
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis committed Dec 1, 2024
1 parent 7bc898c commit 80da131
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 16 deletions.
5 changes: 3 additions & 2 deletions lib/isodoc/itu/presentation_xml_convert.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def twitter_cldr_localiser_symbols
end

# KILL
def clause1(elem)
def clause1x(elem)
clause1_super?(elem) and return super
@suppressheadingnumbers || elem["unnumbered"] and return
t = elem.at(ns("./title")) and t["depth"] = "1"
Expand All @@ -135,7 +135,8 @@ def clause1(elem)
lbl.blank? || elem["unnumbered"] and return
elem.previous =
"<p keep-with-next='true' class='supertitle'>" \
"<span element='fmt-element-name'>#{@i18n.get['section'].upcase}</span> #{autonum(elem['id'], lbl)}</p>"
"#{labelled_autonum(@i18n.get['section'].upcase, elem["id"], lbl)}</p>"
#"<span element='fmt-element-name'>#{@i18n.get['section'].upcase}</span> #{autonum(elem['id'], lbl)}</p>"
end

def clause1_super?(elem)
Expand Down
2 changes: 0 additions & 2 deletions spec/isodoc/blocks_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,6 @@
<fmt-name>
<span class="fmt-caption-label">
<span class="fmt-element-name">Table</span>
<semx element="autonum" source=""/>
</span>
<span class="fmt-caption-delim"> — </span>
<semx element="name" source="_">Title title</semx>
Expand Down Expand Up @@ -710,7 +709,6 @@
<fmt-name>
<span class="fmt-caption-label">
<span class="fmt-element-name">Table</span>
<semx element="autonum" source=""/>
</span>
<span class="fmt-caption-delim"> — </span>
<semx element="name" source="_">
Expand Down
5 changes: 1 addition & 4 deletions spec/isodoc/i18n_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -780,10 +780,7 @@
<br/>
<div id="P" class="Section3">
<h1 class="Annex">
<b>
附件
A
</b>
<b>附件A</b>
<br/>
<br/>
<b>Annex</b>
Expand Down
2 changes: 1 addition & 1 deletion spec/isodoc/ituconvert_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
<p class="zzSTDTitle1" align="center" displayorder="1">RESOLUTION 1 (Andorra, 1204)</p>
<p align="center" class="zzSTDTitle2" displayorder="2"><em>(Andorra, 1204</em>)<fn reference="1"><p>One fn</p></fn><fn reference="2"><p>Another fn</p></fn></p>
<p keep-with-next="true" class="supertitle" displayorder="3">
<span element="fmt-element-name">SECTION</span>
<span class="fmt-element-name">SECTION</span>
<semx element="autonum" source="A">1</semx>
</p>
<clause id='A' displayorder='4'>
Expand Down
10 changes: 5 additions & 5 deletions spec/isodoc/section_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1778,7 +1778,7 @@
<p>Text</p>
</clause>
<p keep-with-next="true" class="supertitle" displayorder="5">
<span element="fmt-element-name">SECTION</span>
<span class="fmt-element-name">SECTION</span>
<semx element="autonum" source="B">1</semx>
</p>
<clause id="B" displayorder="6">
Expand Down Expand Up @@ -1848,7 +1848,7 @@
)
</p>
<p keep-with-next="true" class="supertitle" displayorder="4">
<span element="fmt-element-name">SECTION</span>
<span class="fmt-element-name">SECTION</span>
<semx element="autonum" source="A">1</semx>
</p>
<clause id="A" displayorder="5">
Expand Down Expand Up @@ -1888,7 +1888,7 @@
</p>
</clause>
<p keep-with-next="true" class="supertitle" displayorder="6">
<span element="fmt-element-name">SECTION</span>
<span class="fmt-element-name">SECTION</span>
<semx element="autonum" source="B">
1
<em>bis</em>
Expand All @@ -1901,7 +1901,7 @@
</fmt-title>
</clause>
<p keep-with-next="true" class="supertitle" displayorder="8">
<span element="fmt-element-name">SECTION</span>
<span class="fmt-element-name">SECTION</span>
<semx element="autonum" source="C">
10
<em>ter</em>
Expand Down Expand Up @@ -1946,7 +1946,7 @@
</clause>
</clause>
<p keep-with-next="true" class="supertitle" displayorder="10">
<span element="fmt-element-name">SECTION</span>
<span class="fmt-element-name">SECTION</span>
<semx element="autonum" source="E">10bit</semx>
</p>
<clause id="E" number="10bit" displayorder="11">
Expand Down
4 changes: 2 additions & 2 deletions spec/isodoc/xref_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@
)
</p>
<p keep-with-next="true" class="supertitle" displayorder="5">
<span element="fmt-element-name">SECTION</span>
<span class="fmt-element-name">SECTION</span>
<semx element="autonum" source="D">1</semx>
</p>
<clause id="D" obligation="normative" type="scope" displayorder="6">
Expand All @@ -1074,7 +1074,7 @@
<p id="E">Text</p>
</clause>
<p keep-with-next="true" class="supertitle" displayorder="7">
<span element="fmt-element-name">SECTION</span>
<span class="fmt-element-name">SECTION</span>
<semx element="autonum" source="M">2</semx>
</p>
<clause id="M" inline-header="false" obligation="normative" displayorder="8">
Expand Down

0 comments on commit 80da131

Please sign in to comment.