mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
docs(gen_help_html): accept "~/" in file/dir params #24240
This commit is contained in:
parent
5f442e1a4a
commit
6da110d617
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user