Skip to content

Commit

Permalink
fixup! fix: Render ol items correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
kesara committed Jul 9, 2024
1 parent 0f35391 commit fdb6fb8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions xml2rfc/writers/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -2150,9 +2150,11 @@ def render_li(self, e, width, **kwargs):
tt, __ = self.text_or_block_renderer(e, width, **kwargs)
if isinstance(tt, list):
lines = stripl(tt)
if (lines and
lines[0].elem.tag not in ['artwork', 'figure', 'sourcecode'] and
not (p.tag == 'ul' and lines[0].elem.tag == 'li')):
if (
lines
and lines[0].elem.tag not in ["artwork", "figure", "sourcecode"]
and not (p.tag == "ul" and lines[0].elem.tag == "li")
):
lines[0].text = text + lines[0].text.lstrip(stripspace)
else:
text += tt.lstrip(stripspace)
Expand Down

0 comments on commit fdb6fb8

Please sign in to comment.