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