Skip to content

Commit

Permalink
html2vimdoc: Bug fix: Reset indent for nested inline nodes (issue #3)
Browse files Browse the repository at this point in the history
Issue #3 on GitHub:
  #3
  • Loading branch information
xolox committed May 31, 2013
1 parent b3ebaaf commit d59273b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions html2vimdoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,11 @@ def join_inline(nodes, **kw):
"""
Join a sequence of inline nodes into a single string.
"""
# Render the indentation at the current level.
prefix = ' ' * kw['indent']
# Reset the indentation for nested inline nodes.
kw['indent'] = 0
# Render the inline nodes.
logger.debug("Inline nodes: %s", nodes)
rendered_nodes = [n.render(**kw) for n in nodes]
return "\n".join(textwrap.wrap(compact("".join(rendered_nodes)),
Expand Down

0 comments on commit d59273b

Please sign in to comment.