mirror of
https://github.com/neovim/neovim.git
synced 2025-09-19 17:58:18 +00:00
fix(gen): prevent "make doc" failure due to temporary files
Notably, the existence of a swap file like .buffer.c.swp might cause mayhem. As a reasonable filter, only process *.c and *.h files using the c grammar.
This commit is contained in:
@@ -178,7 +178,7 @@ local function get_api_meta()
|
||||
--- @type table<string,nvim.cdoc.parser.fun>
|
||||
local functions = {}
|
||||
for path, ty in vim.fs.dir(f) do
|
||||
if ty == 'file' then
|
||||
if ty == 'file' and (vim.endswith(path, '.c') or vim.endswith(path, '.h')) then
|
||||
local filename = vim.fs.joinpath(f, path)
|
||||
local _, funs = cdoc_parser.parse(filename)
|
||||
for _, fn in ipairs(funs) do
|
||||
|
Reference in New Issue
Block a user