Hide trailing white space warning for markdown (#28)

In the markdown syntax, it’s actually valid to have trailing spaces (it
creates a line break).

Quoting https://en.wikipedia.org/wiki/Markdown
> Two spaces at the end of a line
> produce a line break.
This commit is contained in:
Clément Joly
2021-12-10 14:22:31 +00:00
committed by GitHub
parent 5c6b2e9a7c
commit 3ed48995e6

View File

@@ -19,6 +19,9 @@ local function search(prefix, pattern)
end
local function check_trailing()
if vim.tbl_contains({'markdown'}, bo.filetype) then
return ''
end
return search('trailing', [[\s$]])
end