Skip to content

Commit

Permalink
fix: Add missing bracket in pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
jakewvincent committed Jun 18, 2024
1 parent 9b5209f commit def7c62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/mkdnflow/foldtext.lua
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ local count_words = function(lines, singular, plural)
local _str = str:gsub('^%s*%d+%.%s*', '') -- Remove the number for ordered lists
_str = _str:gsub('%s*[-*+%d]%.?%s*%[.%]%s+', '') -- Remove to-do checkboxes, either in an ordered or unordered list
_str = _str:gsub('(%b[])%b()', '%1') -- Remove the source part of a markdown link
_str = _str:gsub('%[%[([^|]-)|([^%]-)%]%]', '[[|%2]]') -- Remove the source part of a wiki link
_str = _str:gsub('%[%[([^|]-)|([^%]]-)%]%]', '[[%2]]') -- Remove the source part of a wiki link
_str = _str:gsub("(%w+)['](%w+)", '%1%2') -- Remove word-internal apostrophes, dashes
_str = _str:gsub('([%w._-]+)@[%w]+%.[%w]+', '%1') -- Keep only the name (not the domain) of an email address
-- TODO: URLs, paths (ensure that each of these is only counted as a single word)
Expand Down

0 comments on commit def7c62

Please sign in to comment.