aboutsummaryrefslogtreecommitdiff
path: root/scripts/gen_help_html.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2022-10-20 09:20:02 -0400
committerGitHub <noreply@github.com>2022-10-20 06:20:02 -0700
commite6917306f6d3ba99747d14bea3f0b078631c5c0e (patch)
tree8a8e52c0f2452718d67a451a3ad19efb01569573 /scripts/gen_help_html.lua
parente33995e936c57064bf5629f6b527bfc1b77f77f8 (diff)
downloadrneovim-e6917306f6d3ba99747d14bea3f0b078631c5c0e.tar.gz
rneovim-e6917306f6d3ba99747d14bea3f0b078631c5c0e.tar.bz2
rneovim-e6917306f6d3ba99747d14bea3f0b078631c5c0e.zip
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
Diffstat (limited to 'scripts/gen_help_html.lua')
-rw-r--r--scripts/gen_help_html.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/gen_help_html.lua b/scripts/gen_help_html.lua
index 3a384bccf9..afc045dc96 100644
--- a/scripts/gen_help_html.lua
+++ b/scripts/gen_help_html.lua
@@ -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