docs: update vimdoc parser #20747

Remove the user-manual ToC from help.txt, because:
1. it duplicates usr_toc.txt
2. it is not what most readers are looking for in the main help page.

fix https://github.com/neovim/tree-sitter-vimdoc/issues/49
fix https://github.com/neovim/tree-sitter-vimdoc/issues/50
fix https://github.com/neovim/tree-sitter-vimdoc/issues/51
This commit is contained in:
Justin M. Keyes
2022-10-20 09:20:02 -04:00
committed by GitHub
parent e33995e936
commit e6917306f6
11 changed files with 183 additions and 211 deletions

View File

@@ -519,7 +519,7 @@ local function visit_node(root, level, lang_tree, headings, opt, stats)
return text
end
local s = ('%s<a href="%s#%s">%s</a>'):format(ws(), helppage, url_encode(tagname), html_esc(tagname))
if node_name == 'taglink' and opt.old then
if opt.old and node_name == 'taglink' then
s = fix_tab_after_conceal(s, node_text(root:next_sibling()))
end
return s
@@ -528,7 +528,7 @@ local function visit_node(root, level, lang_tree, headings, opt, stats)
return text
end
local s = ('%s<code>%s</code>'):format(ws(), trimmed)
if node_name == 'codespan' and opt.old then
if opt.old and node_name == 'codespan' then
s = fix_tab_after_conceal(s, node_text(root:next_sibling()))
end
return s