fix(filetype.lua): escape expansion of ~ when used as a pattern

This commit is contained in:
James McCoy
2022-05-02 00:15:16 -04:00
parent e5f6f20968
commit 88595fbb21
2 changed files with 14 additions and 3 deletions

View File

@@ -70,6 +70,7 @@ describe('vim.filetype', function()
it('works with patterns', function()
eq('markdown', exec_lua([[
local root = ...
vim.env.HOME = '/a-funky+home%dir'
vim.filetype.add({
pattern = {
['~/blog/.*%.txt'] = 'markdown',