ci: format
This commit is contained in:
parent
59419e6003
commit
8c04cf19ea
1 changed files with 11 additions and 7 deletions
|
|
@ -119,14 +119,18 @@ end
|
||||||
---@return preview.Diagnostic[]
|
---@return preview.Diagnostic[]
|
||||||
local function parse_mermaid(output)
|
local function parse_mermaid(output)
|
||||||
local lnum = output:match('Parse error on line (%d+)')
|
local lnum = output:match('Parse error on line (%d+)')
|
||||||
if not lnum then return {} end
|
if not lnum then
|
||||||
|
return {}
|
||||||
|
end
|
||||||
local msg = output:match('(Expecting .+)') or 'parse error'
|
local msg = output:match('(Expecting .+)') or 'parse error'
|
||||||
return { {
|
return {
|
||||||
lnum = tonumber(lnum) - 1,
|
{
|
||||||
col = 0,
|
lnum = tonumber(lnum) - 1,
|
||||||
message = msg,
|
col = 0,
|
||||||
severity = vim.diagnostic.severity.ERROR,
|
message = msg,
|
||||||
} }
|
severity = vim.diagnostic.severity.ERROR,
|
||||||
|
},
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
---@type preview.ProviderConfig
|
---@type preview.ProviderConfig
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue