fix(diagnostic): typing

This commit is contained in:
Lewis Russell
2024-01-09 12:47:57 +00:00
committed by Lewis Russell
parent 91ba9d0bf4
commit 50284d07b6
4 changed files with 397 additions and 182 deletions

View File

@@ -291,9 +291,11 @@ function Lua2DoxFilter:process_magic(line)
for _, type in ipairs(TYPES) do
line = line:gsub('^@param%s+([a-zA-Z_?]+)%s+.*%((' .. type .. ')%)', '@param %1 %2')
line = line:gsub('^@param%s+([a-zA-Z_?]+)%s+.*%((' .. type .. '|nil)%)', '@param %1 %2')
line = line:gsub('^@param%s+([a-zA-Z_?]+)%s+.*%((' .. type .. '%?)%)', '@param %1 %2')
line = line:gsub('^@return%s+.*%((' .. type .. ')%)', '@return %1')
line = line:gsub('^@return%s+.*%((' .. type .. '|nil)%)', '@return %1')
line = line:gsub('^@return%s+.*%((' .. type .. '%?)%)', '@return %1')
end
end