Skip to content

Commit

Permalink
feat: Count paragraphs; distinguish from empty lines
Browse files Browse the repository at this point in the history
  • Loading branch information
jakewvincent committed Jun 17, 2024
1 parent 57f5389 commit ebd653e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/mkdnflow/foldtext.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ local object_type = function(text)
return true
end
end
local object = 'other'
local object = 'par'
if text then
if
text:gsub('%[%[.-|.-%]%]', ''):match('%s*[^\\]|.*[^\\]|%s*')
Expand All @@ -56,6 +56,8 @@ local object_type = function(text)
object = 'sec'
elseif text:match('!%b[]%b()') then
object = 'img'
elseif text:match('^%s*$') then
object = 'empty'
end
end
return object
Expand Down

0 comments on commit ebd653e

Please sign in to comment.