diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 33489f44d2..8261c4fd3d 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -655,8 +655,8 @@ vim.bo.bl = vim.bo.buflisted --- "acwrite" implies that the buffer name is not related to a file, like --- "nofile", but it will be written. Thus, in contrast to "nofile" and --- "nowrite", ":w" does work and a modified buffer can't be abandoned ---- without saving. For writing there must be matching `BufWriteCmd|, ---- |FileWriteCmd` or `FileAppendCmd` autocommands. +--- without saving. For writing there must be matching `BufWriteCmd`, +--- `FileWriteCmd` or `FileAppendCmd` autocommands. --- --- @type ''|'acwrite'|'help'|'nofile'|'nowrite'|'quickfix'|'terminal'|'prompt' vim.o.buftype = "" @@ -3278,8 +3278,8 @@ vim.o.ims = vim.o.imsearch vim.bo.imsearch = vim.o.imsearch vim.bo.ims = vim.bo.imsearch ---- When nonempty, shows the effects of `:substitute`, `:smagic|, ---- |:snomagic` and user commands with the `:command-preview` flag as you +--- When nonempty, shows the effects of `:substitute`, `:smagic`, +--- `:snomagic` and user commands with the `:command-preview` flag as you --- type. --- --- Possible values: @@ -3643,8 +3643,8 @@ vim.go.js = vim.go.joinspaces --- when navigating backwards in the jumplist and then --- jumping to a location. `jumplist-stack` --- ---- view When moving through the jumplist, `changelist|, ---- |alternate-file` or using `mark-motions` try to +--- view When moving through the jumplist, `changelist`, +--- `alternate-file` or using `mark-motions` try to --- restore the `mark-view` in which the action occurred. --- --- clean Remove unloaded buffers from the jumplist. @@ -5810,8 +5810,8 @@ vim.go.ssl = vim.go.shellslash --- and the 'shell' command does not need to support redirection. --- The advantage of using a temp file is that the file type and encoding --- can be detected. ---- The `FilterReadPre`, `FilterReadPost` and `FilterWritePre|, ---- |FilterWritePost` autocommands event are not triggered when +--- The `FilterReadPre`, `FilterReadPost` and `FilterWritePre`, +--- `FilterWritePost` autocommands event are not triggered when --- 'shelltemp' is off. --- `system()` does not respect this option, it always uses pipes. --- @@ -6385,8 +6385,8 @@ vim.bo.spo = vim.bo.spelloptions --- --- expr:{expr} Evaluate expression {expr}. Use a function to avoid --- trouble with spaces. Best is to call a function ---- without arguments, see `expr-option-function|. ---- |v:val` holds the badly spelled word. The expression +--- without arguments, see `expr-option-function`. +--- `v:val` holds the badly spelled word. The expression --- must evaluate to a List of Lists, each with a --- suggestion and a score. --- Example: diff --git a/src/gen/gen_eval_files.lua b/src/gen/gen_eval_files.lua index d1bd089dd8..75e4ed5860 100755 --- a/src/gen/gen_eval_files.lua +++ b/src/gen/gen_eval_files.lua @@ -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```')