diff -Nru xml2rfc-3.19.4/CHANGELOG.md xml2rfc-3.20.0/CHANGELOG.md --- xml2rfc-3.19.4/CHANGELOG.md 2024-02-06 22:36:40.000000000 +0000 +++ xml2rfc-3.20.0/CHANGELOG.md 2024-02-21 22:48:18.000000000 +0000 @@ -5,6 +5,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v3.19.4] - 2024-02-06 + +### :bug: Bug Fixes +- [`f319275`](https://github.com/ietf-tools/xml2rfc/commit/f319275b97bf9c0223d7b298404d7c00eb3b16cb) - revert: #1089 (Treat referencegroup entries similarly to reference entries) *(PR #1098 by @kesara)* + - :arrow_lower_right: *fixes issue #1097 opened by @ajeanmahoney* + +### :construction_worker: Build System +- [`8125806`](https://github.com/ietf-tools/xml2rfc/commit/8125806f3764ffcbb3bffb68111022d913870765) - Add revert to version bump list. *(commit by [@kesara](https://github.com/kesara))* + +### :memo: Documentation Changes +- [`4cdfbbf`](https://github.com/ietf-tools/xml2rfc/commit/4cdfbbfd691736ce81edbd6c676528062e84e4f5) - update CHANGELOG.md + py file versions for v3.19.3 [skip ci] *(commit by [@kesara](https://github.com/kesara))* + + ## [v3.19.3] - 2024-02-04 ### :bug: Bug Fixes - [`1652d99`](https://github.com/ietf-tools/xml2rfc/commit/1652d99054928f9b218079db6788a2b5d0aa328a) - Silently pass when weasyprint is not installed *(PR [#1092](https://github.com/ietf-tools/xml2rfc/pull/1092) by [@kesara](https://github.com/kesara))* @@ -2170,4 +2183,5 @@ [v3.19.0]: https://github.com/ietf-tools/xml2rfc/compare/v3.18.2...v3.19.0 [v3.19.1]: https://github.com/ietf-tools/xml2rfc/compare/v3.19.0...v3.19.1 [v3.19.2]: https://github.com/ietf-tools/xml2rfc/compare/v3.19.1...v3.19.2 -[v3.19.3]: https://github.com/ietf-tools/xml2rfc/compare/v3.19.2...v3.19.3 \ No newline at end of file +[v3.19.3]: https://github.com/ietf-tools/xml2rfc/compare/v3.19.2...v3.19.3 +[v3.19.4]: https://github.com/ietf-tools/xml2rfc/compare/v3.19.3...v3.19.4 diff -Nru xml2rfc-3.19.4/PKG-INFO xml2rfc-3.20.0/PKG-INFO --- xml2rfc-3.19.4/PKG-INFO 2024-02-06 22:37:17.850702800 +0000 +++ xml2rfc-3.20.0/PKG-INFO 2024-02-21 22:48:53.622041200 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: xml2rfc -Version: 3.19.4 +Version: 3.20.0 Summary: xml2rfc generates RFCs and IETF drafts from document source in XML according to the IETF xml2rfc v2 and v3 vocabularies. Home-page: https://github.com/ietf-tools/xml2rfc Download-URL: https://github.com/ietf-tools/xml2rfc/releases diff -Nru xml2rfc-3.19.4/debian/changelog xml2rfc-3.20.0/debian/changelog --- xml2rfc-3.19.4/debian/changelog 2024-02-07 15:18:31.000000000 +0000 +++ xml2rfc-3.20.0/debian/changelog 2024-02-26 14:09:17.000000000 +0000 @@ -1,3 +1,10 @@ +xml2rfc (3.20.0-1) unstable; urgency=medium + + * New upstream release + - Refresh patches + + -- Scott Kitterman Mon, 26 Feb 2024 09:09:17 -0500 + xml2rfc (3.19.4-1) unstable; urgency=medium * New upstream release diff -Nru xml2rfc-3.19.4/debian/patches/0002-Work-around-upstream-957.patch xml2rfc-3.20.0/debian/patches/0002-Work-around-upstream-957.patch --- xml2rfc-3.19.4/debian/patches/0002-Work-around-upstream-957.patch 2024-02-07 15:17:18.000000000 +0000 +++ xml2rfc-3.20.0/debian/patches/0002-Work-around-upstream-957.patch 2024-02-26 14:09:17.000000000 +0000 @@ -16,10 +16,10 @@ 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test.py b/test.py -index c809e01..6b21f13 100644 +index 5086480..c812936 100644 --- a/test.py +++ b/test.py -@@ -507,7 +507,8 @@ class PdfWriterTests(unittest.TestCase): +@@ -508,7 +508,8 @@ class PdfWriterTests(unittest.TestCase): for e in self.root.xpath('./middle//*'): if e.text and e.text.strip() and e.tag not in xml2rfc.util.unicode.unicode_content_tags and not xml2rfc.util.unicode.is_svg(e): t = norm(e.text.split(None, 1)[0]) diff -Nru xml2rfc-3.19.4/test.py xml2rfc-3.20.0/test.py --- xml2rfc-3.19.4/test.py 2024-02-06 22:36:40.000000000 +0000 +++ xml2rfc-3.20.0/test.py 2024-02-21 22:48:18.000000000 +0000 @@ -11,6 +11,7 @@ from xml2rfc.boilerplate_rfc_7841 import boilerplate_rfc_status_of_memo from xml2rfc.walkpdf import xmldoc from xml2rfc.writers.base import default_options +from xml2rfc.writers.text import MAX_WIDTH try: from xml2rfc import debug @@ -635,6 +636,67 @@ target = 'https://www.rfc-editor.org/info/rfc9280' self.assertEqual(target, rfc.xpath('./section/t/eref')[0].get('target')) +class TextWriterTest(unittest.TestCase): + '''TextWriter tests''' + + def setUp(self): + xml2rfc.log.quiet = True + path = 'tests/input/elements.xml' + self.parser = xml2rfc.XmlRfcParser(path, + quiet=True, + options=default_options, + **options_for_xmlrfcparser) + self.xmlrfc = self.parser.parse() + self.writer = xml2rfc.TextWriter(self.xmlrfc, quiet=True) + + def test_render_reference(self): + # test annotations + reference = ''' + + + + Reference Test + + ACMI Corp. + + + + {annotation} + +''' + self.writer.refname_mapping['REFTEST'] = 'REFTEST' + + # single line annotation + annotation = 'foobar' + references = lxml.etree.fromstring(reference.format(annotation=annotation)) + lines = self.writer.render_reference(references.getchildren()[0], width=60) + self.assertEqual(len(lines), 1) + self.assertIn(annotation, lines[0].text) + + # multi line annotation + annotation = '''Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. + Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim.''' + references = lxml.etree.fromstring(reference.format(annotation=annotation)) + lines = self.writer.render_reference(references.getchildren()[0], width=60) + self.assertGreater(len(lines), 1) + self.assertIn(annotation[:5], lines[0].text) + + # single line annotation (larger than width and smaller than MAX_WIDTH) + annotation = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commo' + references = lxml.etree.fromstring(reference.format(annotation=annotation)) + lines = self.writer.render_reference(references.getchildren()[0], width=len(annotation)-5) + self.assertGreater(MAX_WIDTH, len(annotation)) + self.assertGreater(len(lines), 1) + self.assertIn(annotation[:5], lines[0].text) + + # annotation with URL + url = 'https://example.org' + annotation = f'Example: ' + references = lxml.etree.fromstring(reference.format(annotation=annotation)) + lines = self.writer.render_reference(references.getchildren()[0], width=60) + self.assertEqual(len(lines), 2) + self.assertIn(url, lines[1].text) + if __name__ == '__main__': unittest.main() diff -Nru xml2rfc-3.19.4/tests/valid/docfile.html xml2rfc-3.20.0/tests/valid/docfile.html --- xml2rfc-3.19.4/tests/valid/docfile.html 2024-02-06 22:36:40.000000000 +0000 +++ xml2rfc-3.20.0/tests/valid/docfile.html 2024-02-21 22:48:18.000000000 +0000 @@ -4,15 +4,15 @@ -Xml2rfc Vocabulary Version 3 Schema xml2rfc release 3.19.3 +Xml2rfc Vocabulary Version 3 Schema xml2rfc release 3.19.4 - - + + @@ -39,7 +39,7 @@
xml2rfc(1)
Published:
- +
Author:
@@ -49,7 +49,7 @@
-

Xml2rfc Vocabulary Version 3 Schema
xml2rfc release 3.19.3

+

Xml2rfc Vocabulary Version 3 Schema
xml2rfc release 3.19.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.19.3.

+ This documentation applies to xml2rfc version 3.19.4.

@@ -4225,11 +4225,12 @@
[BCP14]
+
Best Current Practice 14, <https://www.rfc-editor.org/bcp/bcp14.txt>.
At the time of writing, this BCP comprises the following: +
- Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, .
+ Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/info/rfc2119>.
- Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, .
-<https://www.rfc-editor.org/bcp/bcp14.txt> + Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, , <https://www.rfc-editor.org/info/rfc8174>.
[IDGUIDE]
@@ -6366,7 +6367,7 @@

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

+ manpage Jinja2 template, as of xml2rfc version 3.19.4:

{{ bare_latin_tags }}:
diff -Nru xml2rfc-3.19.4/tests/valid/draft-miek-test.html xml2rfc-3.20.0/tests/valid/draft-miek-test.html --- xml2rfc-3.19.4/tests/valid/draft-miek-test.html 2024-02-06 22:36:40.000000000 +0000 +++ xml2rfc-3.20.0/tests/valid/draft-miek-test.html 2024-02-21 22:48:18.000000000 +0000 @@ -16,7 +16,7 @@ This version is adapted to work with "xml2rfc" version 2.x. ' name="description"> - + @@ -26,7 +26,7 @@ + + @@ -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 9 August 2024. + This Internet-Draft will expire on 22 August 2024.
diff -Nru xml2rfc-3.19.4/tests/valid/indexes.text xml2rfc-3.20.0/tests/valid/indexes.text --- xml2rfc-3.19.4/tests/valid/indexes.text 2024-02-06 22:36:40.000000000 +0000 +++ xml2rfc-3.20.0/tests/valid/indexes.text 2024-02-21 22:48:18.000000000 +0000 @@ -3,9 +3,9 @@ Network Working Group H. Person, Ed. -Internet-Draft February 6, 2024 +Internet-Draft February 19, 2024 Intended status: Experimental -Expires: August 9, 2024 +Expires: August 22, 2024 xml2rfc index tests @@ -26,7 +26,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 August 9, 2024. + This Internet-Draft will expire on August 22, 2024. Copyright Notice diff -Nru xml2rfc-3.19.4/tests/valid/indexes.v3.html xml2rfc-3.20.0/tests/valid/indexes.v3.html --- xml2rfc-3.19.4/tests/valid/indexes.v3.html 2024-02-06 22:36:40.000000000 +0000 +++ xml2rfc-3.20.0/tests/valid/indexes.v3.html 2024-02-21 22:48:18.000000000 +0000 @@ -6,7 +6,7 @@ xml2rfc index tests - + @@ -23,7 +23,7 @@ Person -Expires August 9, 2024 +Expires August 22, 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 August 9, 2024.

+ This Internet-Draft will expire on August 22, 2024.