mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	Use Strings instead of Tables in vim.filetype.matchregex Doc (#19604)
docs: use strings instead of tables in vim.filetype.matchregex doc
This commit is contained in:
		| @@ -2087,9 +2087,9 @@ add({filetypes})                                          *vim.filetype.add()* | |||||||
|                        priority = -math.huge, |                        priority = -math.huge, | ||||||
|                        function(path, bufnr) |                        function(path, bufnr) | ||||||
|                          local content = vim.filetype.getlines(bufnr, 1) |                          local content = vim.filetype.getlines(bufnr, 1) | ||||||
|                          if vim.filetype.matchregex(content, { [[^#!.*\<mine\>]] }) then |                          if vim.filetype.matchregex(content, [[^#!.*\<mine\>]]) then | ||||||
|                            return 'mine' |                            return 'mine' | ||||||
|                          elseif vim.filetype.matchregex(content, { [[\<drawing\>]] }) then |                          elseif vim.filetype.matchregex(content, [[\<drawing\>]]) then | ||||||
|                            return 'drawing' |                            return 'drawing' | ||||||
|                          end |                          end | ||||||
|                        end, |                        end, | ||||||
|   | |||||||
| @@ -2275,9 +2275,9 @@ end | |||||||
| ---       priority = -math.huge, | ---       priority = -math.huge, | ||||||
| ---       function(path, bufnr) | ---       function(path, bufnr) | ||||||
| ---         local content = vim.filetype.getlines(bufnr, 1) | ---         local content = vim.filetype.getlines(bufnr, 1) | ||||||
| ---         if vim.filetype.matchregex(content, { [[^#!.*\\<mine\\>]] }) then | ---         if vim.filetype.matchregex(content, [[^#!.*\\<mine\\>]]) then | ||||||
| ---           return 'mine' | ---           return 'mine' | ||||||
| ---         elseif vim.filetype.matchregex(content, { [[\\<drawing\\>]] }) then | ---         elseif vim.filetype.matchregex(content, [[\\<drawing\\>]]) then | ||||||
| ---           return 'drawing' | ---           return 'drawing' | ||||||
| ---         end | ---         end | ||||||
| ---       end, | ---       end, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 LaurenceWarne
					LaurenceWarne