plugin detectindent: pre-compile regexes

This commit is contained in:
jgmdev 2022-03-17 00:14:36 -04:00
parent dcbebef2ab
commit 5830b7d9f0
1 changed files with 2 additions and 2 deletions

View File

@ -116,10 +116,10 @@ local function get_comment_patterns(syntax)
end
if type(pattern.regex) == "table" then
table.insert(comments, {
"r", startp, pattern.regex[2]
"r", regex.compile(startp), regex.compile(pattern.regex[2])
})
elseif not_is_string then
table.insert(comments, {"r", startp})
table.insert(comments, {"r", regex.compile(startp)})
end
end
elseif pattern.syntax then