Skip to content

Commit 033121a

Browse files
committed
refactor(conceal): Cheap assurance line is candidate for link concealing before gsub
1 parent ca963a0 commit 033121a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/orgmode/org/indent.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ local function foldtext()
9797
line = vim.fn.substitute(line, '\\(^\\*\\+\\)', '\\=repeat(" ", len(submatch(0))-1) . "*"', '')
9898
end
9999

100-
if vim.opt.conceallevel:get() > 0 then
100+
if vim.opt.conceallevel:get() > 0 and string.find(line, '[[', 1, true) then
101101
line = string.gsub(line, '%[%[(.-)%]%[?(.-)%]?%]', function(link, text)
102102
if text == '' then
103103
return link

0 commit comments

Comments
 (0)