mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-10-10 04:02:14 +00:00
build: exclude stylua ignore comments from readme
This commit is contained in:
parent
4ded3ff73b
commit
9f559d0e9d
1 changed files with 5 additions and 1 deletions
|
@ -61,7 +61,11 @@ end
|
||||||
---@return string
|
---@return string
|
||||||
function M.extract(file, pattern)
|
function M.extract(file, pattern)
|
||||||
local init = Util.read_file(file)
|
local init = Util.read_file(file)
|
||||||
return assert(init:match(pattern))
|
local ret = assert(init:match(pattern)) --[[@as string]]
|
||||||
|
local lines = vim.tbl_filter(function(line)
|
||||||
|
return not line:find("^%s*%-%-%s*stylua%s*:%s*ignore%s*$")
|
||||||
|
end, vim.split(ret, "\n"))
|
||||||
|
return table.concat(lines, "\n")
|
||||||
end
|
end
|
||||||
|
|
||||||
---@return ReadmeBlock
|
---@return ReadmeBlock
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue