neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 9f5d5aa3da30aab40bbb38fddfc70257444d50a8
parent ece0850b7393114cac651cf9f43fc2c5e1b1cf50
Author: LaurenceWarne <17688577+LaurenceWarne@users.noreply.github.com>
Date:   Mon,  1 Aug 2022 13:45:43 +0100

Use Strings instead of Tables in vim.filetype.matchregex Doc (#19604)

docs: use strings instead of tables in vim.filetype.matchregex doc
Diffstat:
Mruntime/doc/lua.txt | 4++--
Mruntime/lua/vim/filetype.lua | 4++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt @@ -2087,9 +2087,9 @@ add({filetypes}) *vim.filetype.add()* priority = -math.huge, function(path, bufnr) local content = vim.filetype.getlines(bufnr, 1) - if vim.filetype.matchregex(content, { [[^#!.*\<mine\>]] }) then + if vim.filetype.matchregex(content, [[^#!.*\<mine\>]]) then return 'mine' - elseif vim.filetype.matchregex(content, { [[\<drawing\>]] }) then + elseif vim.filetype.matchregex(content, [[\<drawing\>]]) then return 'drawing' end end, diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua @@ -2275,9 +2275,9 @@ end --- priority = -math.huge, --- function(path, bufnr) --- local content = vim.filetype.getlines(bufnr, 1) ---- if vim.filetype.matchregex(content, { [[^#!.*\\<mine\\>]] }) then +--- if vim.filetype.matchregex(content, [[^#!.*\\<mine\\>]]) then --- return 'mine' ---- elseif vim.filetype.matchregex(content, { [[\\<drawing\\>]] }) then +--- elseif vim.filetype.matchregex(content, [[\\<drawing\\>]]) then --- return 'drawing' --- end --- end,