Skip to content

Commit

Permalink
fix: recover toggle_checkbox util's condition to create a checkbox wi…
Browse files Browse the repository at this point in the history
…th a line without a checkbox
  • Loading branch information
CaeChao authored and CaeChao committed Apr 9, 2024
1 parent 6661806 commit 04ac860
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/obsidian/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ util.toggle_checkbox = function(opts)
if string.match(line, unordered_list_pattern) then
line = string.gsub(line, unordered_list_pattern, "%1- [ ] %2")
else
return
line = string.gsub(line, "^(%s*)", "%1- [ ] ")
end
else
for i, check_char in enumerate(checkboxes) do
Expand Down

0 comments on commit 04ac860

Please sign in to comment.