diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2023-07-03 05:04:43 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-03 05:04:43 -0700 |
commit | 6da110d617dba6378f770c5d66d523df92f2d355 (patch) | |
tree | b8ed0cea71a13e11245163a96a6a3307e41e1946 | |
parent | 5f442e1a4a831ed2eb70d5c2dd66c47b0b8aa7e1 (diff) | |
download | rneovim-6da110d617dba6378f770c5d66d523df92f2d355.tar.gz rneovim-6da110d617dba6378f770c5d66d523df92f2d355.tar.bz2 rneovim-6da110d617dba6378f770c5d66d523df92f2d355.zip |
docs(gen_help_html): accept "~/" in file/dir params #24240
-rw-r--r-- | scripts/gen_help_html.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/gen_help_html.lua b/scripts/gen_help_html.lua index 7f84a4d54d..5575de5b36 100644 --- a/scripts/gen_help_html.lua +++ b/scripts/gen_help_html.lua @@ -1089,7 +1089,7 @@ end --- @returns info dict function M.gen(help_dir, to_dir, include, commit, parser_path) vim.validate{ - help_dir={help_dir, function(d) return vim.fn.isdirectory(d) == 1 end, 'valid directory'}, + help_dir={help_dir, function(d) return vim.fn.isdirectory(vim.fn.expand(d)) == 1 end, 'valid directory'}, to_dir={to_dir, 's'}, include={include, 't', true}, commit={commit, 's', true}, @@ -1098,8 +1098,9 @@ function M.gen(help_dir, to_dir, include, commit, parser_path) local err_count = 0 ensure_runtimepath() - tagmap = get_helptags(help_dir) + tagmap = get_helptags(vim.fn.expand(help_dir)) helpfiles = get_helpfiles(include) + to_dir = vim.fn.expand(to_dir) parser_path = parser_path and vim.fn.expand(parser_path) or nil print(('output dir: %s'):format(to_dir)) @@ -1134,14 +1135,14 @@ end -- @returns results dict function M.validate(help_dir, include, parser_path) vim.validate{ - help_dir={help_dir, function(d) return vim.fn.isdirectory(d) == 1 end, 'valid directory'}, + help_dir={help_dir, function(d) return vim.fn.isdirectory(vim.fn.expand(d)) == 1 end, 'valid directory'}, include={include, 't', true}, parser_path={parser_path, function(f) return f == nil or vim.fn.filereadable(vim.fn.expand(f)) == 1 end, 'valid vimdoc.{so,dll} filepath'}, } local err_count = 0 local files_to_errors = {} ensure_runtimepath() - tagmap = get_helptags(help_dir) + tagmap = get_helptags(vim.fn.expand(help_dir)) helpfiles = get_helpfiles(include) parser_path = parser_path and vim.fn.expand(parser_path) or nil |