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

fix(text): Render list items correctly #1137

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
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
20 changes: 20 additions & 0 deletions tests/input/elements.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1336,6 +1336,26 @@ for opt, value in opts:
</artwork>
<t><xref target="GEDICHTE" format="title"/></t>
</li>
<li>
<t>ul with no bullets</t>
<ul empty="true">
<li>
<ul>
<li>Must not have an empty line with bullet above this line.</li>
</ul>
</li>
</ul>
</li>
<li>
<t>ul with bullets</t>
<ul>
<li>
<ul>
<li>Must have an empty line with bullet above this line.</li>
</ul>
</li>
</ul>
</li>
</ul>
</section>
</middle>
Expand Down
16 changes: 8 additions & 8 deletions tests/valid/docfile.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<meta charset="utf-8">
<meta content="Cherokee,Common,Greek,Latin" name="scripts">
<meta content="initial-scale=1.0" name="viewport">
<title>Xml2rfc Vocabulary Version 3 Schema xml2rfc release 3.21.0</title>
<title>Xml2rfc Vocabulary Version 3 Schema xml2rfc release 3.22.0</title>
<meta content="xml2rfc(1)" name="author">
<meta content="

This document provides information about the XML schema implemented in this release of xml2rfc, and the individual elements of that schema. The document is generated from the RNG schema file that is part of the xml2rfc distribution, so schema information in this document should always be in sync with the schema in actual use. The textual descriptions depend on manual updates in order to reflect the implementation.

" name="description">
<meta content="xml2rfc 3.21.0" name="generator">
<meta content="xml2rfc-docs-3.21.0" name="ietf.draft">
<meta content="xml2rfc 3.22.0" name="generator">
<meta content="xml2rfc-docs-3.22.0" name="ietf.draft">
<link href="tests/out/docfile.xml" rel="alternate" type="application/rfc+xml">
<link href="#copyright" rel="license">
<link href="xml2rfc.css" rel="stylesheet">
Expand All @@ -24,7 +24,7 @@
<thead><tr>
<td class="left"></td>
<td class="center">Xml2rfc Vocabulary V3 Schema</td>
<td class="right">April 2024</td>
<td class="right">July 2024</td>
</tr></thead>
<tfoot><tr>
<td class="left">xml2rfc(1)</td>
Expand All @@ -39,7 +39,7 @@
<dd class="workgroup">xml2rfc(1)</dd>
<dt class="label-published">Published:</dt>
<dd class="published">
<time datetime="2024-04-23" class="published">23 April 2024</time>
<time datetime="2024-07-09" class="published">9 July 2024</time>
</dd>
<dt class="label-authors">Author:</dt>
<dd class="authors">
Expand All @@ -49,7 +49,7 @@
</dd>
</dl>
</div>
<h1 id="title">Xml2rfc Vocabulary Version 3 Schema<br>xml2rfc release 3.21.0</h1>
<h1 id="title">Xml2rfc Vocabulary Version 3 Schema<br>xml2rfc release 3.22.0</h1>
<section id="section-abstract">
<h2 id="abstract"><a href="#abstract" class="selfRef">Abstract</a></h2>
<p id="section-abstract-1">
Expand Down Expand Up @@ -371,7 +371,7 @@ <h2 id="name-introduction">
<p id="section-1-5">
The latest version of this documentation is available in HTML form at <span><a href="https://ietf-tools.github.io/xml2rfc/">https://ietf-tools.github.io/xml2rfc/</a></span>.<a href="#section-1-5" class="pilcrow">¶</a></p>
<p id="section-1-6">
This documentation applies to xml2rfc version 3.21.0.<a href="#section-1-6" class="pilcrow">¶</a></p>
This documentation applies to xml2rfc version 3.22.0.<a href="#section-1-6" class="pilcrow">¶</a></p>
</section>
<section id="section-2">
<h2 id="name-schema-version-3-elements">
Expand Down Expand Up @@ -6367,7 +6367,7 @@ <h2 id="name-xml2rfc-documentation-templ">
<p id="appendix-D-1">

The following variables are available for use in an xml2rfc
manpage Jinja2 template, as of xml2rfc version 3.21.0:<a href="#appendix-D-1" class="pilcrow">¶</a></p>
manpage Jinja2 template, as of xml2rfc version 3.22.0:<a href="#appendix-D-1" class="pilcrow">¶</a></p>
<span class="break"></span><dl class="dlNewline" id="appendix-D-2">
<dt id="appendix-D-2.1">{{ bare_latin_tags }}:</dt>
<dd style="margin-left: 1.5em" id="appendix-D-2.2"></dd>
Expand Down
17 changes: 8 additions & 9 deletions tests/valid/draft-miek-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
This version is adapted to work with "xml2rfc" version 2.x.

' name="description">
<meta content="xml2rfc 3.21.0" name="generator">
<meta content="xml2rfc 3.22.0" name="generator">
<meta content="RFC" name="keyword">
<meta content="Request for Comments" name="keyword">
<meta content="I-D" name="keyword">
Expand All @@ -26,21 +26,20 @@
<meta content="Extensible Markup Language" name="keyword">
<meta content="draft-gieben-writing-rfcs-pandoc-02" name="ietf.draft">
<!-- Generator version information:
xml2rfc 3.21.0
xml2rfc 3.22.0
Python 3.10.12
ConfigArgParse 1.7
google-i18n-address 3.1.0
intervaltree 3.1.0
Jinja2 3.1.3
Jinja2 3.1.4
lxml 4.9.4
platformdirs 4.2.0
pycountry 23.12.11
platformdirs 4.2.2
pycountry 24.6.1
PyYAML 6.0.1
requests 2.31.0
setuptools 69.0.2
six 1.16.0
requests 2.32.3
setuptools 70.1.0
wcwidth 0.2.13
weasyprint 61.2
weasyprint 62.3
-->
<link href="tests/input/draft-miek-test.xml" rel="alternate" type="application/rfc+xml">
<link href="#copyright" rel="license">
Expand Down
17 changes: 8 additions & 9 deletions tests/valid/draft-template.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,24 @@
Insert an abstract: MANDATORY. This template is for creating an
Internet Draft.
" name="description">
<meta content="xml2rfc 3.21.0" name="generator">
<meta content="xml2rfc 3.22.0" name="generator">
<meta content="template" name="keyword">
<meta content="draft-ietf-xml2rfc-template-05" name="ietf.draft">
<!-- Generator version information:
xml2rfc 3.21.0
xml2rfc 3.22.0
Python 3.10.12
ConfigArgParse 1.7
google-i18n-address 3.1.0
intervaltree 3.1.0
Jinja2 3.1.3
Jinja2 3.1.4
lxml 4.9.4
platformdirs 4.2.0
pycountry 23.12.11
platformdirs 4.2.2
pycountry 24.6.1
PyYAML 6.0.1
requests 2.31.0
setuptools 69.0.2
six 1.16.0
requests 2.32.3
setuptools 70.1.0
wcwidth 0.2.13
weasyprint 61.2
weasyprint 62.3
-->
<link href="tests/input/draft-template.xml" rel="alternate" type="application/rfc+xml">
<link href="#copyright" rel="license">
Expand Down
90 changes: 45 additions & 45 deletions tests/valid/elements.bom.text
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ Table of Contents
Unnumbered section . . . . . . . . . . . . . . . . . . . . . . . 23
References . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Normative References . . . . . . . . . . . . . . . . . . . . . 24
Informative References . . . . . . . . . . . . . . . . . . . . 24
CMS References . . . . . . . . . . . . . . . . . . . . . . . 24
Informative References . . . . . . . . . . . . . . . . . . . . 25
CMS References . . . . . . . . . . . . . . . . . . . . . . . 25
ESS References . . . . . . . . . . . . . . . . . . . . . . . 25
MIME-SPEC References . . . . . . . . . . . . . . . . . . . . 25
Other References . . . . . . . . . . . . . . . . . . . . . . 26
Appendix A. Some Back Matter . . . . . . . . . . . . . . . . . . 26
A.1. Contributors . . . . . . . . . . . . . . . . . . . . . . 26
A.1. Contributors . . . . . . . . . . . . . . . . . . . . . . 27
A.2. Arbitrary^superscript in section _title_ . . . . . . . . 27
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 27

Expand Down Expand Up @@ -450,6 +450,7 @@ Author, et al. Expires 13 January 2019 [Page 8]
Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018


4.
4.1 Sublist with '%p' parent counter element in the list
counter, item one

Expand Down Expand Up @@ -500,7 +501,6 @@ Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018




Author, et al. Expires 13 January 2019 [Page 9]

Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018
Expand Down Expand Up @@ -1304,13 +1304,23 @@ Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018
* Indent="5". “The heaviest penalty for declining to rule is to
be ruled by someone inferior to yourself.” Πολιτεία

*
Ich weiß nicht, was soll es bedeuten,
Daß ich so traurig bin;
Ein Mährchen aus alten Zeiten,
Das kommt mir nicht aus dem Sinn.

Dreiunddreißig Gedichte

* ul with no bullets

o Must not have an empty line with bullet above this line.

* ul with bullets

-
o Must have an empty line with bullet above this line.

References

Normative References
Expand All @@ -1328,6 +1338,14 @@ Normative References
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.




Author, et al. Expires 13 January 2019 [Page 24]

Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018


Informative References

CMS References
Expand All @@ -1339,13 +1357,6 @@ CMS References
<https://datatracker.ietf.org/doc/html/draft-levkowetz-
xml2rfc-v3-implementation-notes-13>.



Author, et al. Expires 13 January 2019 [Page 24]

Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018


[RFC5083] Housley, R., "Cryptographic Message Syntax (CMS)
Authenticated-Enveloped-Data Content Type", RFC 5083,
DOI 10.17487/RFC5083, November 2007,
Expand Down Expand Up @@ -1383,6 +1394,14 @@ MIME-SPEC References
RFC 2047, DOI 10.17487/RFC2047, November 1996,
<https://www.rfc-editor.org/info/rfc2047>.




Author, et al. Expires 13 January 2019 [Page 25]

Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018


[RFC2049] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
Extensions (MIME) Part Five: Conformance Criteria and
Examples", RFC 2049, DOI 10.17487/RFC2049, November 1996,
Expand All @@ -1393,15 +1412,6 @@ MIME-SPEC References
BCP 13, RFC 4289, DOI 10.17487/RFC4289, December 2005,
<https://www.rfc-editor.org/info/rfc4289>.





Author, et al. Expires 13 January 2019 [Page 25]

Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018


[RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type
Specifications and Registration Procedures", BCP 13,
RFC 6838, DOI 10.17487/RFC6838, January 2013,
Expand Down Expand Up @@ -1440,16 +1450,6 @@ Appendix A. Some Back Matter
ut sapien venenatis maximus. Morbi ut faucibus nunc, vitae pretium
lorem. Aliquam sit amet tortor ut turpis dapibus ullamcorper. Proin
at ligula nec magna molestie eleifend:
トヨタ 自動車 株式会社 (Toyota Jidōsha KK).
// This is a long comment line which extends well beyond the
// 72-character page width.

A.1. Contributors

We'd like to thank these contributors:






Expand All @@ -1458,6 +1458,14 @@ Author, et al. Expires 13 January 2019 [Page 26]
Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018


トヨタ 自動車 株式会社 (Toyota Jidōsha KK).
// This is a long comment line which extends well beyond the
// 72-character page width.

A.1. Contributors

We'd like to thank these contributors:

Roni Even
Huawei
David Hamelech 14
Expand Down Expand Up @@ -1499,21 +1507,20 @@ Authors' Addresses

Additional contact information:

רוני אבן
וואווי
דוד המלך 14
תל אביב 64953
ישראל





Author, et al. Expires 13 January 2019 [Page 27]

Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018


רוני אבן
וואווי
דוד המלך 14
תל אביב 64953
ישראל


Hanako Tanaka
3-kai B-goshitsu
4-3-2 Hakusan, Bunkyo-ku, Tokyo
Expand Down Expand Up @@ -1558,11 +1565,4 @@ Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018










Author, et al. Expires 13 January 2019 [Page 28]
Loading
Loading