diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-05-24 19:18:11 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-05-24 19:18:11 +0000 |
commit | ff7ed8f586589d620a806c3758fac4a47a8e7e15 (patch) | |
tree | 729bbcb92231538fa61dab6c3d890b025484b7f5 /runtime/lua/vim/_meta/re.lua | |
parent | 376914f419eb08fdf4c1a63a77e1f035898a0f10 (diff) | |
parent | 28c04948a1c887a1cc0cb64de79fa32631700466 (diff) | |
download | rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.tar.gz rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.tar.bz2 rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.zip |
Merge remote-tracking branch 'upstream/master' into mix_20240309
Diffstat (limited to 'runtime/lua/vim/_meta/re.lua')
-rw-r--r-- | runtime/lua/vim/_meta/re.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/runtime/lua/vim/_meta/re.lua b/runtime/lua/vim/_meta/re.lua index 14c94c7824..d16751fbbf 100644 --- a/runtime/lua/vim/_meta/re.lua +++ b/runtime/lua/vim/_meta/re.lua @@ -8,11 +8,11 @@ error('Cannot require a meta file') -- See 'lpeg.html' for license --- @brief ---- The `vim.re` module provides a conventional regex-like syntax for pattern usage ---- within LPeg |vim.lpeg|. +--- The `vim.re` module provides a conventional regex-like syntax for pattern usage within LPeg +--- |vim.lpeg|. (Unrelated to |vim.regex| which provides Vim |regexp| from Lua.) --- ---- See https://www.inf.puc-rio.br/~roberto/lpeg/re.html for the original ---- documentation including regex syntax and more concrete examples. +--- See https://www.inf.puc-rio.br/~roberto/lpeg/re.html for the original documentation including +--- regex syntax and examples. --- Compiles the given {string} and returns an equivalent LPeg pattern. The given string may define --- either an expression or a grammar. The optional {defs} table provides extra Lua values to be used @@ -30,8 +30,8 @@ function vim.re.compile(string, defs) end --- @param subject string --- @param pattern vim.lpeg.Pattern|string --- @param init? integer ---- @return integer|nil the index where the occurrence starts, nil if no match ---- @return integer|nil the index where the occurrence ends, nil if no match +--- @return integer|nil : the index where the occurrence starts, nil if no match +--- @return integer|nil : the index where the occurrence ends, nil if no match function vim.re.find(subject, pattern, init) end --- Does a global substitution, replacing all occurrences of {pattern} in the given {subject} by |