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

(cherry picked from commit 4b2c2eb120)
This commit is contained in:
zeertzjq
2025-06-16 09:06:07 +08:00
committed by github-actions[bot]
parent 742ea00742
commit ce292026ea
2 changed files with 12 additions and 12 deletions

View File

@@ -359,11 +359,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```')