docs(meta): fix incorrect bar -> backtick replacement (#34520)

This commit is contained in:
zeertzjq
2025-06-16 09:06:07 +08:00
committed by GitHub
parent 00ad477419
commit 4b2c2eb120
2 changed files with 12 additions and 12 deletions

View File

@@ -367,11 +367,11 @@ local function norm_text(x, special)
x = x:gsub([=[%|?(nvim_[^.()| ]+)%(?%)?%|?]=], 'vim.api.%1')
-- TODO: Remove backticks when LuaLS resolves: https://github.com/LuaLS/lua-language-server/issues/2889
-- "|foo|" => "`:help foo`"
x = x:gsub([=[|([^ ]+)|]=], '`:help %1`')
x = x:gsub([=[|([^%s|]+)|]=], '`:help %1`')
end
return (
x:gsub('|([^ ]+)|', '`%1`')
x:gsub('|([^%s|]+)|', '`%1`')
:gsub('\n*>lua', '\n\n```lua')
:gsub('\n*>vim', '\n\n```vim')
:gsub('\n+<$', '\n```')