From fa1ad029e9dc011f4dc253687b0b4de2842e8e8a Mon Sep 17 00:00:00 2001 From: Kesara Rathnayake Date: Fri, 28 Jul 2023 04:12:38 +1200 Subject: [PATCH] fix: Improve pagination in text output (#1019) This fixes an edge case text pagination. --- tests/valid/docfile.html | 16 ++++++++-------- tests/valid/draft-miek-test.html | 12 ++++++------ tests/valid/draft-template-old.exp.xml | 6 +++--- tests/valid/draft-template-old.prepped.xml | 10 +++++----- tests/valid/draft-template-old.v2v3.xml | 8 ++++---- tests/valid/draft-template.exp.xml | 6 +++--- tests/valid/draft-template.html | 12 ++++++------ tests/valid/draft-template.prepped.xml | 10 +++++----- tests/valid/draft-v3-features.prepped.xml | 6 +++--- tests/valid/elements.prepped.xml | 22 +++++++++++----------- tests/valid/indexes.pages.text | 16 ++++++++-------- tests/valid/indexes.prepped.xml | 8 ++++---- tests/valid/indexes.text | 6 +++--- tests/valid/indexes.v3.html | 12 ++++++------ tests/valid/manpage.txt | 10 +++++----- tests/valid/rfc7911.exp.xml | 4 ++-- tests/valid/rfc7911.html | 12 ++++++------ tests/valid/rfc7911.prepped.xml | 6 +++--- tests/valid/sourcecode.pages.text | 20 ++++++++++---------- tests/valid/sourcecode.prepped.xml | 8 ++++---- tests/valid/sourcecode.text | 6 +++--- tests/valid/sourcecode.v3.html | 12 ++++++------ xml2rfc/writers/text.py | 5 +++-- 23 files changed, 117 insertions(+), 116 deletions(-) diff --git a/tests/valid/docfile.html b/tests/valid/docfile.html index 87a01a3e..726a3f6d 100644 --- a/tests/valid/docfile.html +++ b/tests/valid/docfile.html @@ -4,15 +4,15 @@ -Xml2rfc Vocabulary Version 3 Schema xml2rfc release 3.17.3 +Xml2rfc Vocabulary Version 3 Schema xml2rfc release 3.17.4 - - + + @@ -24,7 +24,7 @@ Xml2rfc Vocabulary V3 Schema -June 2023 +July 2023 xml2rfc(1) @@ -39,7 +39,7 @@
xml2rfc(1)
Published:
- +
Author:
@@ -49,7 +49,7 @@
-

Xml2rfc Vocabulary Version 3 Schema
xml2rfc release 3.17.3

+

Xml2rfc Vocabulary Version 3 Schema
xml2rfc release 3.17.4

Abstract

@@ -371,7 +371,7 @@

The latest version of this documentation is available in HTML form at https://ietf-tools.github.io/xml2rfc/.

- This documentation applies to xml2rfc version 3.17.3.

+ This documentation applies to xml2rfc version 3.17.4.

@@ -6366,7 +6366,7 @@

The following variables are available for use in an xml2rfc - manpage Jinja2 template, as of xml2rfc version 3.17.3:

+ manpage Jinja2 template, as of xml2rfc version 3.17.4:

{{ bare_latin_tags }}:
diff --git a/tests/valid/draft-miek-test.html b/tests/valid/draft-miek-test.html index be5bf8e2..0c5a2ecd 100644 --- a/tests/valid/draft-miek-test.html +++ b/tests/valid/draft-miek-test.html @@ -16,7 +16,7 @@ This version is adapted to work with "xml2rfc" version 2.x. ' name="description"> - + @@ -26,16 +26,16 @@ + + @@ -556,7 +556,7 @@ main(int argc, char *argv[]) - In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements. + In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements. @@ -669,7 +669,7 @@ main(int argc, char *argv[]) - This memo presents a technique for using XML (Extensible Markup Language) as a source format for documents in the Internet-Drafts (I-Ds) and Request for Comments (RFC) series. This memo provides information for the Internet community. + This memo presents a technique for using XML (Extensible Markup Language) as a source format for documents in the Internet-Drafts (I-Ds) and Request for Comments (RFC) series. This memo provides information for the Internet community. @@ -682,7 +682,7 @@ main(int argc, char *argv[]) - All RFCs are required to have a Security Considerations section. Historically, such sections have been relatively weak. This document provides guidelines to RFC authors on how to write a good Security Considerations section. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements. + All RFCs are required to have a Security Considerations section. Historically, such sections have been relatively weak. This document provides guidelines to RFC authors on how to write a good Security Considerations section. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements. diff --git a/tests/valid/draft-template-old.v2v3.xml b/tests/valid/draft-template-old.v2v3.xml index 605f9412..993f9fcd 100644 --- a/tests/valid/draft-template-old.v2v3.xml +++ b/tests/valid/draft-template-old.v2v3.xml @@ -33,7 +33,7 @@ - + @@ -455,7 +455,7 @@ main(int argc, char *argv[]) - In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements. + In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements. @@ -484,7 +484,7 @@ main(int argc, char *argv[]) - This memo presents a technique for using XML (Extensible Markup Language) as a source format for documents in the Internet-Drafts (I-Ds) and Request for Comments (RFC) series. This memo provides information for the Internet community. + This memo presents a technique for using XML (Extensible Markup Language) as a source format for documents in the Internet-Drafts (I-Ds) and Request for Comments (RFC) series. This memo provides information for the Internet community. @@ -497,7 +497,7 @@ main(int argc, char *argv[]) - All RFCs are required to have a Security Considerations section. Historically, such sections have been relatively weak. This document provides guidelines to RFC authors on how to write a good Security Considerations section. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements. + All RFCs are required to have a Security Considerations section. Historically, such sections have been relatively weak. This document provides guidelines to RFC authors on how to write a good Security Considerations section. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements. diff --git a/tests/valid/draft-template.exp.xml b/tests/valid/draft-template.exp.xml index de2bdd0a..5e4bd5fb 100644 --- a/tests/valid/draft-template.exp.xml +++ b/tests/valid/draft-template.exp.xml @@ -420,7 +420,7 @@ main(int argc, char *argv[]) - In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements. + In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements. @@ -448,7 +448,7 @@ main(int argc, char *argv[]) - This memo presents a technique for using XML (Extensible Markup Language) as a source format for documents in the Internet-Drafts (I-Ds) and Request for Comments (RFC) series. This memo provides information for the Internet community. + This memo presents a technique for using XML (Extensible Markup Language) as a source format for documents in the Internet-Drafts (I-Ds) and Request for Comments (RFC) series. This memo provides information for the Internet community. @@ -461,7 +461,7 @@ main(int argc, char *argv[]) - All RFCs are required to have a Security Considerations section. Historically, such sections have been relatively weak. This document provides guidelines to RFC authors on how to write a good Security Considerations section. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements. + All RFCs are required to have a Security Considerations section. Historically, such sections have been relatively weak. This document provides guidelines to RFC authors on how to write a good Security Considerations section. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements. diff --git a/tests/valid/draft-template.html b/tests/valid/draft-template.html index bacc77e8..cf13429e 100644 --- a/tests/valid/draft-template.html +++ b/tests/valid/draft-template.html @@ -11,20 +11,20 @@ Insert an abstract: MANDATORY. This template is for creating an Internet Draft. " name="description"> - + + + @@ -556,7 +556,7 @@ main(int argc, char *argv[]) - In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements. + In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements. @@ -699,7 +699,7 @@ main(int argc, char *argv[]) - This memo presents a technique for using XML (Extensible Markup Language) as a source format for documents in the Internet-Drafts (I-Ds) and Request for Comments (RFC) series. This memo provides information for the Internet community. + This memo presents a technique for using XML (Extensible Markup Language) as a source format for documents in the Internet-Drafts (I-Ds) and Request for Comments (RFC) series. This memo provides information for the Internet community. @@ -712,7 +712,7 @@ main(int argc, char *argv[]) - All RFCs are required to have a Security Considerations section. Historically, such sections have been relatively weak. This document provides guidelines to RFC authors on how to write a good Security Considerations section. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements. + All RFCs are required to have a Security Considerations section. Historically, such sections have been relatively weak. This document provides guidelines to RFC authors on how to write a good Security Considerations section. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements. diff --git a/tests/valid/draft-v3-features.prepped.xml b/tests/valid/draft-v3-features.prepped.xml index f312727a..81798b13 100644 --- a/tests/valid/draft-v3-features.prepped.xml +++ b/tests/valid/draft-v3-features.prepped.xml @@ -1,6 +1,6 @@ - - + + @@ -4001,7 +4001,7 @@ foo = bar - This document defines a Transport Subsystem, extending the Simple Network Management Protocol (SNMP) architecture defined in RFC 3411. This document defines a subsystem to contain Transport Models that is comparable to other subsystems in the RFC 3411 architecture. As work is being done to expand the transports to include secure transports, such as the Secure Shell (SSH) Protocol and Transport Layer Security (TLS), using a subsystem will enable consistent design and modularity of such Transport Models. This document identifies and describes some key aspects that need to be considered for any Transport Model for SNMP. [STANDARDS-TRACK] + This document defines a Transport Subsystem, extending the Simple Network Management Protocol (SNMP) architecture defined in RFC 3411. This document defines a subsystem to contain Transport Models that is comparable to other subsystems in the RFC 3411 architecture. As work is being done to expand the transports to include secure transports, such as the Secure Shell (SSH) Protocol and Transport Layer Security (TLS), using a subsystem will enable consistent design and modularity of such Transport Models. This document identifies and describes some key aspects that need to be considered for any Transport Model for SNMP. [STANDARDS-TRACK] diff --git a/tests/valid/elements.prepped.xml b/tests/valid/elements.prepped.xml index 9ce3b06d..69f62ac7 100644 --- a/tests/valid/elements.prepped.xml +++ b/tests/valid/elements.prepped.xml @@ -1,5 +1,5 @@ - + @@ -1572,7 +1572,7 @@ for opt, value in opts: - In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements. + In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements. @@ -1609,7 +1609,7 @@ for opt, value in opts: - RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings. + RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings. @@ -1641,7 +1641,7 @@ for opt, value in opts: - This document describes an additional content type for the Cryptographic Message Syntax (CMS). The authenticated-enveloped-data content type is intended for use with authenticated encryption modes. All of the various key management techniques that are supported in the CMS enveloped-data content type are also supported by the CMS authenticated-enveloped-data content type. [STANDARDS-TRACK] + This document describes an additional content type for the Cryptographic Message Syntax (CMS). The authenticated-enveloped-data content type is intended for use with authenticated encryption modes. All of the various key management techniques that are supported in the CMS enveloped-data content type are also supported by the CMS authenticated-enveloped-data content type. [STANDARDS-TRACK] @@ -1653,7 +1653,7 @@ for opt, value in opts: - This document describes the Cryptographic Message Syntax (CMS). This syntax is used to digitally sign, digest, authenticate, or encrypt arbitrary message content. [STANDARDS-TRACK] + This document describes the Cryptographic Message Syntax (CMS). This syntax is used to digitally sign, digest, authenticate, or encrypt arbitrary message content. [STANDARDS-TRACK] @@ -1681,7 +1681,7 @@ for opt, value in opts: - In the original Enhanced Security Services for S/MIME document (RFC 2634), a structure for cryptographically linking the certificate to be used in validation with the signature was introduced; this structure was hardwired to use SHA-1. This document allows for the structure to have algorithm agility and defines a new attribute for this purpose. [STANDARDS-TRACK] + In the original Enhanced Security Services for S/MIME document (RFC 2634), a structure for cryptographically linking the certificate to be used in validation with the signature was introduced; this structure was hardwired to use SHA-1. This document allows for the structure to have algorithm agility and defines a new attribute for this purpose. [STANDARDS-TRACK] @@ -1722,7 +1722,7 @@ for opt, value in opts: - This particular document is the third document in the series. It describes extensions to RFC 822 to allow non-US-ASCII text data in Internet mail header fields. [STANDARDS-TRACK] + This particular document is the third document in the series. It describes extensions to RFC 822 to allow non-US-ASCII text data in Internet mail header fields. [STANDARDS-TRACK] @@ -1735,7 +1735,7 @@ for opt, value in opts: - This set of documents, collectively called the Multipurpose Internet Mail Extensions, or MIME, redefines the format of messages. This fifth and final document describes MIME conformance criteria as well as providing some illustrative examples of MIME message formats, acknowledgements, and the bibliography. [STANDARDS-TRACK] + This set of documents, collectively called the Multipurpose Internet Mail Extensions, or MIME, redefines the format of messages. This fifth and final document describes MIME conformance criteria as well as providing some illustrative examples of MIME message formats, acknowledgements, and the bibliography. [STANDARDS-TRACK] @@ -1748,7 +1748,7 @@ for opt, value in opts: - This document specifies IANA registration procedures for MIME external body access types and content-transfer-encodings. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements. + This document specifies IANA registration procedures for MIME external body access types and content-transfer-encodings. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements. @@ -1763,7 +1763,7 @@ for opt, value in opts: - This document defines procedures for the specification and registration of media types for use in HTTP, MIME, and other Internet protocols. This memo documents an Internet Best Current Practice. + This document defines procedures for the specification and registration of media types for use in HTTP, MIME, and other Internet protocols. This memo documents an Internet Best Current Practice. @@ -1840,7 +1840,7 @@ for opt, value in opts: - This RFC is the official specification of the format of the Internet Host Table. This edition of the specification includes minor revisions to RFC-810 which brings it up to date. + This RFC is the official specification of the format of the Internet Host Table. This edition of the specification includes minor revisions to RFC-810 which brings it up to date. diff --git a/tests/valid/indexes.pages.text b/tests/valid/indexes.pages.text index c2cd0910..93391028 100644 --- a/tests/valid/indexes.pages.text +++ b/tests/valid/indexes.pages.text @@ -3,9 +3,9 @@ Network Working Group H. Person, Ed. -Internet-Draft June 22, 2023 +Internet-Draft July 26, 2023 Intended status: Experimental -Expires: December 24, 2023 +Expires: January 27, 2024 xml2rfc index tests @@ -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 December 24, 2023. + This Internet-Draft will expire on January 27, 2024. Copyright Notice @@ -53,9 +53,9 @@ Table of Contents -Person Expires December 24, 2023 [Page 1] +Person Expires January 27, 2024 [Page 1] -Internet-Draft xml2rfc index tests June 2023 +Internet-Draft xml2rfc index tests July 2023 This is another section! @@ -109,9 +109,9 @@ Index -Person Expires December 24, 2023 [Page 2] +Person Expires January 27, 2024 [Page 2] -Internet-Draft xml2rfc index tests June 2023 +Internet-Draft xml2rfc index tests July 2023 E @@ -165,4 +165,4 @@ Author's Address -Person Expires December 24, 2023 [Page 3] +Person Expires January 27, 2024 [Page 3] diff --git a/tests/valid/indexes.prepped.xml b/tests/valid/indexes.prepped.xml index 26161cf4..75a1a001 100644 --- a/tests/valid/indexes.prepped.xml +++ b/tests/valid/indexes.prepped.xml @@ -1,6 +1,6 @@ - - + + @@ -20,7 +20,7 @@ - +
Status of This Memo @@ -41,7 +41,7 @@ material or to cite them other than as "work in progress." - This Internet-Draft will expire on 24 December 2023. + This Internet-Draft will expire on 27 January 2024.
diff --git a/tests/valid/indexes.text b/tests/valid/indexes.text index bcb5203f..bf0ae99c 100644 --- a/tests/valid/indexes.text +++ b/tests/valid/indexes.text @@ -3,9 +3,9 @@ Network Working Group H. Person, Ed. -Internet-Draft June 22, 2023 +Internet-Draft July 26, 2023 Intended status: Experimental -Expires: December 24, 2023 +Expires: January 27, 2024 xml2rfc index tests @@ -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 December 24, 2023. + This Internet-Draft will expire on January 27, 2024. Copyright Notice diff --git a/tests/valid/indexes.v3.html b/tests/valid/indexes.v3.html index f7436019..bf2d7dfd 100644 --- a/tests/valid/indexes.v3.html +++ b/tests/valid/indexes.v3.html @@ -6,7 +6,7 @@ xml2rfc index tests - + @@ -19,11 +19,11 @@ Internet-Draft xml2rfc index tests -June 2023 +July 2023 Person -Expires December 24, 2023 +Expires January 27, 2024 [Page] @@ -36,12 +36,12 @@
indexes-00
Published:
- +
Intended Status:
Experimental
Expires:
-
+
Author:
@@ -71,7 +71,7 @@

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 December 24, 2023.

+ This Internet-Draft will expire on January 27, 2024.