Skip to content

Commit

Permalink
fix(v2v3): Preserve t element in ol and li (#972)
Browse files Browse the repository at this point in the history
* fix(v2v3): Preserve t element in ol and li

This change preserves `<t>` elements inside `<ol>` and `<li>` elements
on v2v3 conversion.

Fixes #850
  • Loading branch information
kesara authored Aug 30, 2023
1 parent 02253d8 commit 0704155
Show file tree
Hide file tree
Showing 24 changed files with 2,365 additions and 943 deletions.
267 changes: 178 additions & 89 deletions tests/valid/draft-miek-test.html

Large diffs are not rendered by default.

356 changes: 268 additions & 88 deletions tests/valid/draft-miek-test.prepped.xml

Large diffs are not rendered by default.

350 changes: 264 additions & 86 deletions tests/valid/draft-miek-test.v2v3.xml

Large diffs are not rendered by default.

269 changes: 179 additions & 90 deletions tests/valid/draft-miek-test.v3.html

Large diffs are not rendered by default.

350 changes: 261 additions & 89 deletions tests/valid/draft-template-old.prepped.xml

Large diffs are not rendered by default.

348 changes: 260 additions & 88 deletions tests/valid/draft-template-old.v2v3.xml

Large diffs are not rendered by default.

260 changes: 173 additions & 87 deletions tests/valid/draft-template.html

Large diffs are not rendered by default.

350 changes: 261 additions & 89 deletions tests/valid/draft-template.prepped.xml

Large diffs are not rendered by default.

348 changes: 260 additions & 88 deletions tests/valid/draft-template.v2v3.xml

Large diffs are not rendered by default.

262 changes: 174 additions & 88 deletions tests/valid/draft-template.v3.html

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions tests/valid/indexes.pages.text
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@


Network Working Group H. Person, Ed.
Internet-Draft August 21, 2023
Internet-Draft August 29, 2023
Intended status: Experimental
Expires: February 22, 2024
Expires: March 1, 2024


xml2rfc index tests
Expand All @@ -26,7 +26,7 @@ Status of This Memo
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."

This Internet-Draft will expire on February 22, 2024.
This Internet-Draft will expire on March 1, 2024.

Copyright Notice

Expand All @@ -53,7 +53,7 @@ Table of Contents



Person Expires February 22, 2024 [Page 1]
Person Expires March 1, 2024 [Page 1]

Internet-Draft xml2rfc index tests August 2023

Expand Down Expand Up @@ -109,7 +109,7 @@ Index



Person Expires February 22, 2024 [Page 2]
Person Expires March 1, 2024 [Page 2]

Internet-Draft xml2rfc index tests August 2023

Expand Down Expand Up @@ -165,4 +165,4 @@ Author's Address



Person Expires February 22, 2024 [Page 3]
Person Expires March 1, 2024 [Page 3]
6 changes: 3 additions & 3 deletions tests/valid/indexes.prepped.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" sortRefs="true" category="exp" submissionType="independent" ipr="trust200902" docName="indexes-00" indexInclude="true" prepTime="2023-08-21T04:28:58" scripts="Common,Latin" symRefs="true" tocDepth="3" tocInclude="true">
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" sortRefs="true" category="exp" submissionType="independent" ipr="trust200902" docName="indexes-00" indexInclude="true" prepTime="2023-08-29T11:20:28" scripts="Common,Latin" symRefs="true" tocDepth="3" tocInclude="true">
<!-- xml2rfc v2v3 conversion 3.18.0 -->


Expand All @@ -20,7 +20,7 @@
</postal>
</address>
</author>
<date day="21" month="08" year="2023"/>
<date day="29" month="08" year="2023"/>
<boilerplate>
<section anchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1">
<name slugifiedName="name-status-of-this-memo">Status of This Memo</name>
Expand All @@ -41,7 +41,7 @@
material or to cite them other than as "work in progress."
</t>
<t indent="0" pn="section-boilerplate.1-4">
This Internet-Draft will expire on 22 February 2024.
This Internet-Draft will expire on 1 March 2024.
</t>
</section>
<section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">
Expand Down
6 changes: 3 additions & 3 deletions tests/valid/indexes.text
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@


Network Working Group H. Person, Ed.
Internet-Draft August 21, 2023
Internet-Draft August 29, 2023
Intended status: Experimental
Expires: February 22, 2024
Expires: March 1, 2024


xml2rfc index tests
Expand All @@ -26,7 +26,7 @@ Status of This Memo
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."

This Internet-Draft will expire on February 22, 2024.
This Internet-Draft will expire on March 1, 2024.

Copyright Notice

Expand Down
8 changes: 4 additions & 4 deletions tests/valid/indexes.v3.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</tr></thead>
<tfoot><tr>
<td class="left">Person</td>
<td class="center">Expires February 22, 2024</td>
<td class="center">Expires March 1, 2024</td>
<td class="right">[Page]</td>
</tr></tfoot>
</table>
Expand All @@ -36,12 +36,12 @@
<dd class="internet-draft">indexes-00</dd>
<dt class="label-published">Published:</dt>
<dd class="published">
<time datetime="2023-08-21" class="published">August 21, 2023</time>
<time datetime="2023-08-29" class="published">August 29, 2023</time>
</dd>
<dt class="label-intended-status">Intended Status:</dt>
<dd class="intended-status">Experimental</dd>
<dt class="label-expires">Expires:</dt>
<dd class="expires"><time datetime="2024-02-22">February 22, 2024</time></dd>
<dd class="expires"><time datetime="2024-03-01">March 1, 2024</time></dd>
<dt class="label-authors">Author:</dt>
<dd class="authors">
<div class="author">
Expand Down Expand Up @@ -71,7 +71,7 @@ <h2 id="name-status-of-this-memo">
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."<a href="#section-boilerplate.1-3" class="pilcrow"></a></p>
<p id="section-boilerplate.1-4">
This Internet-Draft will expire on February 22, 2024.<a href="#section-boilerplate.1-4" class="pilcrow"></a></p>
This Internet-Draft will expire on March 1, 2024.<a href="#section-boilerplate.1-4" class="pilcrow"></a></p>
</section>
</div>
<div id="copyright">
Expand Down
2 changes: 1 addition & 1 deletion tests/valid/manpage.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
xml2rfc(1) xml2rfc(1)
21 August 2023
29 August 2023


Xml2rfc Vocabulary Version 3 Schema
Expand Down
16 changes: 10 additions & 6 deletions tests/valid/rfc7911.html
Original file line number Diff line number Diff line change
Expand Up @@ -1460,27 +1460,31 @@ <h2 id="name-add-path-capability">
<li class="normal ulEmpty" id="section-4-4.1">
<p id="section-4-4.1.1">Address Family Identifier (AFI):<a href="#section-4-4.1.1" class="pilcrow"></a></p>
<ul class="normal">
<li class="normal" id="section-4-4.1.2.1">This field is the same as the one used in <span>[<a href="#RFC4760" class="cite xref">RFC4760</a>]</span>.<a href="#section-4-4.1.2.1" class="pilcrow"></a>
<li class="normal" id="section-4-4.1.2.1">
<p id="section-4-4.1.2.1.1">This field is the same as the one used in <span>[<a href="#RFC4760" class="cite xref">RFC4760</a>]</span>.<a href="#section-4-4.1.2.1.1" class="pilcrow"></a></p>
</li>
</ul>
</li>
<li class="normal ulEmpty" id="section-4-4.2">
<p id="section-4-4.2.1">Subsequent Address Family Identifier (SAFI):<a href="#section-4-4.2.1" class="pilcrow"></a></p>
<ul class="normal">
<li class="normal" id="section-4-4.2.2.1">This field is the same as the one used in <span>[<a href="#RFC4760" class="cite xref">RFC4760</a>]</span>.<a href="#section-4-4.2.2.1" class="pilcrow"></a>
<li class="normal" id="section-4-4.2.2.1">
<p id="section-4-4.2.2.1.1">This field is the same as the one used in <span>[<a href="#RFC4760" class="cite xref">RFC4760</a>]</span>.<a href="#section-4-4.2.2.1.1" class="pilcrow"></a></p>
</li>
</ul>
</li>
<li class="normal ulEmpty" id="section-4-4.3">
<p id="section-4-4.3.1">Send/Receive:<a href="#section-4-4.3.1" class="pilcrow"></a></p>
<ul class="normal">
<li class="normal" id="section-4-4.3.2.1">This field indicates whether the sender is (a) able to
<li class="normal" id="section-4-4.3.2.1">
<p id="section-4-4.3.2.1.1">This field indicates whether the sender is (a) able to
receive multiple paths from its peer (value 1), (b) able to send
multiple paths to its peer (value 2), or (c) both (value 3) for
the &lt;AFI, SAFI&gt;.<a href="#section-4-4.3.2.1" class="pilcrow"></a>
the &lt;AFI, SAFI&gt;.<a href="#section-4-4.3.2.1.1" class="pilcrow"></a></p>
</li>
<li class="normal" id="section-4-4.3.2.2">If any other value is received, then the capability SHOULD be
treated as not understood and ignored <span>[<a href="#RFC5492" class="cite xref">RFC5492</a>]</span>.<a href="#section-4-4.3.2.2" class="pilcrow"></a>
<li class="normal" id="section-4-4.3.2.2">
<p id="section-4-4.3.2.2.1">If any other value is received, then the capability SHOULD be
treated as not understood and ignored <span>[<a href="#RFC5492" class="cite xref">RFC5492</a>]</span>.<a href="#section-4-4.3.2.2.1" class="pilcrow"></a></p>
</li>
</ul>
</li>
Expand Down
22 changes: 15 additions & 7 deletions tests/valid/rfc7911.prepped.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" number="7911" category="std" consensus="true" submissionType="IETF" ipr="trust200902" docName="draft-ietf-idr-add-paths" obsoletes="" updates="" xml:lang="en" tocInclude="true" sortRefs="true" symRefs="true" prepTime="2023-08-02T01:28:17" indexInclude="true" scripts="Common,Latin" tocDepth="3">
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" number="7911" category="std" consensus="true" submissionType="IETF" ipr="trust200902" docName="draft-ietf-idr-add-paths" obsoletes="" updates="" xml:lang="en" tocInclude="true" sortRefs="true" symRefs="true" prepTime="2023-08-29T11:29:51" indexInclude="true" scripts="Common,Latin" tocDepth="3">
<link href="https://dx.doi.org/10.17487/rfc7911" rel="alternate"/>
<link href="urn:issn:2070-1721" rel="alternate"/>
<link href="https://datatracker.ietf.org/doc/draft-ietf-idr-add-paths" rel="prev"/>
Expand Down Expand Up @@ -241,24 +241,32 @@
<li pn="section-4-4.1">
<t indent="0" pn="section-4-4.1.1">Address Family Identifier (AFI): </t>
<ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4-4.1.2">
<li pn="section-4-4.1.2.1">This field is the same as the one used in <xref format="default" target="RFC4760" sectionFormat="of" derivedContent="RFC4760"/>.</li>
<li pn="section-4-4.1.2.1">
<t indent="0" pn="section-4-4.1.2.1.1">This field is the same as the one used in <xref format="default" target="RFC4760" sectionFormat="of" derivedContent="RFC4760"/>.</t>
</li>
</ul>
</li>
<li pn="section-4-4.2">
<t indent="0" pn="section-4-4.2.1">Subsequent Address Family Identifier (SAFI): </t>
<ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4-4.2.2">
<li pn="section-4-4.2.2.1">This field is the same as the one used in <xref format="default" target="RFC4760" sectionFormat="of" derivedContent="RFC4760"/>.</li>
<li pn="section-4-4.2.2.1">
<t indent="0" pn="section-4-4.2.2.1.1">This field is the same as the one used in <xref format="default" target="RFC4760" sectionFormat="of" derivedContent="RFC4760"/>.</t>
</li>
</ul>
</li>
<li pn="section-4-4.3">
<t indent="0" pn="section-4-4.3.1">Send/Receive: </t>
<ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4-4.3.2">
<li pn="section-4-4.3.2.1">This field indicates whether the sender is (a) able to
<li pn="section-4-4.3.2.1">
<t indent="0" pn="section-4-4.3.2.1.1">This field indicates whether the sender is (a) able to
receive multiple paths from its peer (value 1), (b) able to send
multiple paths to its peer (value 2), or (c) both (value 3) for
the &lt;AFI, SAFI&gt;.</li>
<li pn="section-4-4.3.2.2">If any other value is received, then the capability SHOULD be
treated as not understood and ignored <xref format="default" target="RFC5492" sectionFormat="of" derivedContent="RFC5492"/>.</li>
the &lt;AFI, SAFI&gt;.</t>
</li>
<li pn="section-4-4.3.2.2">
<t indent="0" pn="section-4-4.3.2.2.1">If any other value is received, then the capability SHOULD be
treated as not understood and ignored <xref format="default" target="RFC5492" sectionFormat="of" derivedContent="RFC5492"/>.</t>
</li>
</ul>
</li>
</ul>
Expand Down
22 changes: 15 additions & 7 deletions tests/valid/rfc7911.v2v3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" number="7911" category="std" consensus="true" submissionType="IETF" ipr="trust200902" docName="draft-ietf-idr-add-paths" obsoletes="" updates="" xml:lang="en" tocInclude="true" sortRefs="true" symRefs="true" version="3">
<!-- xml2rfc v2v3 conversion 3.17.5 -->
<!-- xml2rfc v2v3 conversion 3.18.0 -->
<link href="https://datatracker.ietf.org/doc/draft-ietf-idr-add-paths" rel="prev"/>
<front>
<title abbrev="ADD-PATH">Advertisement of Multiple Paths in BGP</title>
Expand Down Expand Up @@ -159,24 +159,32 @@
<li>
<t>Address Family Identifier (AFI): </t>
<ul spacing="normal">
<li>This field is the same as the one used in <xref format="default" target="RFC4760"/>.</li>
<li>
<t>This field is the same as the one used in <xref format="default" target="RFC4760"/>.</t>
</li>
</ul>
</li>
<li>
<t>Subsequent Address Family Identifier (SAFI): </t>
<ul spacing="normal">
<li>This field is the same as the one used in <xref format="default" target="RFC4760"/>.</li>
<li>
<t>This field is the same as the one used in <xref format="default" target="RFC4760"/>.</t>
</li>
</ul>
</li>
<li>
<t>Send/Receive: </t>
<ul spacing="normal">
<li>This field indicates whether the sender is (a) able to
<li>
<t>This field indicates whether the sender is (a) able to
receive multiple paths from its peer (value 1), (b) able to send
multiple paths to its peer (value 2), or (c) both (value 3) for
the &lt;AFI, SAFI&gt;.</li>
<li>If any other value is received, then the capability SHOULD be
treated as not understood and ignored <xref format="default" target="RFC5492"/>.</li>
the &lt;AFI, SAFI&gt;.</t>
</li>
<li>
<t>If any other value is received, then the capability SHOULD be
treated as not understood and ignored <xref format="default" target="RFC5492"/>.</t>
</li>
</ul>
</li>
</ul>
Expand Down
18 changes: 11 additions & 7 deletions tests/valid/rfc7911.v3.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
that each path is identified by a Path Identifier in addition to the
address prefix.
" name="description">
<meta content="xml2rfc 3.15.3" name="generator">
<meta content="xml2rfc 3.18.0" name="generator">
<meta content="7911" name="rfc.number">
<link href="tests/input/rfc7911.xml" rel="alternate" type="application/rfc+xml">
<link href="#copyright" rel="license">
Expand Down Expand Up @@ -280,27 +280,31 @@ <h2 id="name-add-path-capability">
<li class="normal ulEmpty" id="section-4-4.1">
<p id="section-4-4.1.1">Address Family Identifier (AFI):<a href="#section-4-4.1.1" class="pilcrow"></a></p>
<ul class="normal">
<li class="normal" id="section-4-4.1.2.1">This field is the same as the one used in <span>[<a href="#RFC4760" class="cite xref">RFC4760</a>]</span>.<a href="#section-4-4.1.2.1" class="pilcrow"></a>
<li class="normal" id="section-4-4.1.2.1">
<p id="section-4-4.1.2.1.1">This field is the same as the one used in <span>[<a href="#RFC4760" class="cite xref">RFC4760</a>]</span>.<a href="#section-4-4.1.2.1.1" class="pilcrow"></a></p>
</li>
</ul>
</li>
<li class="normal ulEmpty" id="section-4-4.2">
<p id="section-4-4.2.1">Subsequent Address Family Identifier (SAFI):<a href="#section-4-4.2.1" class="pilcrow"></a></p>
<ul class="normal">
<li class="normal" id="section-4-4.2.2.1">This field is the same as the one used in <span>[<a href="#RFC4760" class="cite xref">RFC4760</a>]</span>.<a href="#section-4-4.2.2.1" class="pilcrow"></a>
<li class="normal" id="section-4-4.2.2.1">
<p id="section-4-4.2.2.1.1">This field is the same as the one used in <span>[<a href="#RFC4760" class="cite xref">RFC4760</a>]</span>.<a href="#section-4-4.2.2.1.1" class="pilcrow"></a></p>
</li>
</ul>
</li>
<li class="normal ulEmpty" id="section-4-4.3">
<p id="section-4-4.3.1">Send/Receive:<a href="#section-4-4.3.1" class="pilcrow"></a></p>
<ul class="normal">
<li class="normal" id="section-4-4.3.2.1">This field indicates whether the sender is (a) able to
<li class="normal" id="section-4-4.3.2.1">
<p id="section-4-4.3.2.1.1">This field indicates whether the sender is (a) able to
receive multiple paths from its peer (value 1), (b) able to send
multiple paths to its peer (value 2), or (c) both (value 3) for
the &lt;AFI, SAFI&gt;.<a href="#section-4-4.3.2.1" class="pilcrow"></a>
the &lt;AFI, SAFI&gt;.<a href="#section-4-4.3.2.1.1" class="pilcrow"></a></p>
</li>
<li class="normal" id="section-4-4.3.2.2">If any other value is received, then the capability SHOULD be
treated as not understood and ignored <span>[<a href="#RFC5492" class="cite xref">RFC5492</a>]</span>.<a href="#section-4-4.3.2.2" class="pilcrow"></a>
<li class="normal" id="section-4-4.3.2.2">
<p id="section-4-4.3.2.2.1">If any other value is received, then the capability SHOULD be
treated as not understood and ignored <span>[<a href="#RFC5492" class="cite xref">RFC5492</a>]</span>.<a href="#section-4-4.3.2.2.1" class="pilcrow"></a></p>
</li>
</ul>
</li>
Expand Down
14 changes: 7 additions & 7 deletions tests/valid/sourcecode.pages.text
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@


Network Working Group H. Person, Ed.
Internet-Draft August 21, 2023
Internet-Draft August 29, 2023
Intended status: Experimental
Expires: February 22, 2024
Expires: March 1, 2024


xml2rfc sourcecode tests
Expand All @@ -26,7 +26,7 @@ Status of This Memo
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."

This Internet-Draft will expire on February 22, 2024.
This Internet-Draft will expire on March 1, 2024.

Copyright Notice

Expand All @@ -53,7 +53,7 @@ Table of Contents



Person Expires February 22, 2024 [Page 1]
Person Expires March 1, 2024 [Page 1]

Internet-Draft xml2rfc sourcecode tests August 2023

Expand Down Expand Up @@ -109,7 +109,7 @@ Internet-Draft xml2rfc sourcecode tests August 2023



Person Expires February 22, 2024 [Page 2]
Person Expires March 1, 2024 [Page 2]

Internet-Draft xml2rfc sourcecode tests August 2023

Expand Down Expand Up @@ -165,7 +165,7 @@ Internet-Draft xml2rfc sourcecode tests August 2023



Person Expires February 22, 2024 [Page 3]
Person Expires March 1, 2024 [Page 3]

Internet-Draft xml2rfc sourcecode tests August 2023

Expand Down Expand Up @@ -221,4 +221,4 @@ Author's Address



Person Expires February 22, 2024 [Page 4]
Person Expires March 1, 2024 [Page 4]
Loading

0 comments on commit 0704155

Please sign in to comment.