changeset 8537:6783a7f2b5e1

bug: fix replacement for param writer_name -> writer correctly. Use the html4css1 writer for now. If you use the html5_polyglot you end up with: <main> processed rst </main> rather than (html4css1 writer's): <div class="document"> processed rst </div> there can only be one <main> per document. Each message must not be inside a <main> tag. I could string munge the main tag to a div. But that's ugly. The correct way is to subclass html5_polyglot and override the HTMLTrnslator::documenttag_args replacing {'tagname': 'main'} with {'tagname': 'div', "CLASS": "document"} or something similar. That's a change for another time.
author John Rouillard <rouilj@ieee.org>
date Sat, 21 Mar 2026 23:49:14 -0400
parents 5800afdebded
children f676eda10c20
files roundup/cgi/templating.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/roundup/cgi/templating.py	Sat Mar 21 21:40:57 2026 -0400
+++ b/roundup/cgi/templating.py	Sat Mar 21 23:49:14 2026 -0400
@@ -40,6 +40,7 @@
 
 try:
     from docutils.core import publish_parts as ReStructuredText
+    from docutils.writers.html4css1 import Writer as html_writer
 except ImportError:
     ReStructuredText = None
 try:
@@ -1887,7 +1888,7 @@
                     raise
 
         return u2s(ReStructuredText(
-            s, writer="html",
+            s, writer=html_writer(),
             settings_overrides=self.rst_defaults)["html_body"])
 
     def markdown(self, hyperlink=1):

Roundup Issue Tracker: http://roundup-tracker.org/