@@ -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 March 1, 2024.¶
+ This Internet-Draft will expire on March 3, 2024.
¶
diff --git a/xml2rfc/writers/text.py b/xml2rfc/writers/text.py
index dc802bca..fcf011db 100644
--- a/xml2rfc/writers/text.py
+++ b/xml2rfc/writers/text.py
@@ -529,9 +529,14 @@ def tjoin(self, text, e, width, **kwargs):
if width < minwidth(text):
self.die(e, "Trying to render text in a too narrow column: width: %s, text: '%s'" % (width, text))
kwargs['hang'] = j.hang
- etext = self.render(e, width, **kwargs)
- itext = indent(etext, j.indent, j.hang)
- if text:
+
+ if e.tag == "name":
+ e.text = f"{text}{j.join if e.text or len(e.getchildren()) > 0 else ''} {e.text or ''}"
+ etext = self.render(e, width, **kwargs)
+ text = indent(etext, j.indent, j.hang).lstrip(stripspace)
+ elif text:
+ etext = self.render(e, width, **kwargs)
+ itext = indent(etext, j.indent, j.hang)
if '\n' in j.join:
text += j.join + itext
elif j.join.strip(stripspace) and not itext.strip(stripspace):
@@ -540,7 +545,10 @@ def tjoin(self, text, e, width, **kwargs):
else:
text += j.join + itext.lstrip(stripspace)
else:
+ etext = self.render(e, width, **kwargs)
+ itext = indent(etext, j.indent, j.hang)
text = itext
+
return text
def ljoin(self, lines, e, width, **kwargs):
@@ -1737,7 +1745,7 @@ def render_figure(self, e, width, **kwargs):
pn = e.get('pn')
num = pn.split('-')[1].capitalize()
children = e.getchildren()
- title = "Figure %s" % (num, )
+ title = f"Figure {num}"
if len(children) and children[0].tag == 'name':
name = children[0]
children = children[1:]