Re-enabled comment cache.
This commit is contained in:
@@ -76,9 +76,9 @@ end
|
|||||||
|
|
||||||
|
|
||||||
local function get_comment_patterns(syntax)
|
local function get_comment_patterns(syntax)
|
||||||
if syntax.name and comments_cache[syntax.name] then
|
if comments_cache[syntax] then
|
||||||
if #comments_cache[syntax.name] > 0 then
|
if #comments_cache[syntax] > 0 then
|
||||||
return comments_cache[syntax.name]
|
return comments_cache[syntax]
|
||||||
else
|
else
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
@@ -150,9 +150,7 @@ local function get_comment_patterns(syntax)
|
|||||||
table.insert(comments, {"p", "^%s*" .. block_comment[1], block_comment[2]})
|
table.insert(comments, {"p", "^%s*" .. block_comment[1], block_comment[2]})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if syntax.name then
|
comments_cache[syntax] = comments
|
||||||
comments_cache[syntax.name] = comments
|
|
||||||
end
|
|
||||||
if #comments > 0 then
|
if #comments > 0 then
|
||||||
return comments
|
return comments
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user