plugin detectindent: pre-compile regexes
This commit is contained in:
@@ -116,10 +116,10 @@ local function get_comment_patterns(syntax)
|
|||||||
end
|
end
|
||||||
if type(pattern.regex) == "table" then
|
if type(pattern.regex) == "table" then
|
||||||
table.insert(comments, {
|
table.insert(comments, {
|
||||||
"r", startp, pattern.regex[2]
|
"r", regex.compile(startp), regex.compile(pattern.regex[2])
|
||||||
})
|
})
|
||||||
elseif not_is_string then
|
elseif not_is_string then
|
||||||
table.insert(comments, {"r", startp})
|
table.insert(comments, {"r", regex.compile(startp)})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elseif pattern.syntax then
|
elseif pattern.syntax then
|
||||||
|
|||||||
Reference in New Issue
Block a user