fix(help): properly escape helptags search pattern (#268)

This commit is contained in:
Munif Tanjim 2023-01-01 15:56:18 +06:00 committed by GitHub
parent 0a0f1b95e9
commit 1edd1b8945
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -18,6 +18,7 @@ function M.index(plugin)
if title then if title then
local tag = plugin.name .. "-" .. title:lower():gsub("%W+", "-") local tag = plugin.name .. "-" .. title:lower():gsub("%W+", "-")
tag = tag:gsub("%-+", "-"):gsub("%-$", "") tag = tag:gsub("%-+", "-"):gsub("%-$", "")
line = line:gsub("([%[%]/])", "\\%1")
tags[tag] = { tag = tag, line = line, file = plugin.name .. ".md" } tags[tag] = { tag = tag, line = line, file = plugin.name .. ".md" }
end end
end end