fix(docs): missing "(" in :help HTML

Problem:
Since eba7b5b646
any opening paren and its leading whitespace " (" are missing in the
generated HTML. Example:

    Use ":qa!<Enter>" (careful, all changes are lost!).
                     ^^missing
    Position the cursor on a tag (e.g. bars) and hit CTRL-].
                                ^^missing

Solution:
The main recursive loop only processes named children, so check
named_child_count() instead of child_count().  Then anonymous nodes
won't get lost.
This commit is contained in:
Justin M. Keyes 2022-10-04 15:15:06 +02:00
parent b075f49d92
commit 6abb481051

View File

@ -350,7 +350,7 @@ local function visit_node(root, level, lang_tree, headings, opt, stats)
return node_text():match('^%s+') or ''
end
if root:child_count() == 0 or node_name == 'ERROR' then
if root:named_child_count() == 0 or node_name == 'ERROR' then
text = node_text()
else
-- Process children and join them with whitespace.