From 92aff652100a5c4ceaa738301f016cd17ca05ad5 Mon Sep 17 00:00:00 2001 From: borja Date: Mon, 27 Nov 2023 19:02:40 +0100 Subject: [PATCH] cambia los patterns --- plugin/todoer.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugin/todoer.lua b/plugin/todoer.lua index acf81a1..05e3666 100644 --- a/plugin/todoer.lua +++ b/plugin/todoer.lua @@ -29,16 +29,16 @@ vim.keymap.set("i", "", press_enter, { desc = "On enter", noremap = true, ex local function toggle_todo() -- create a variable called openpattern with a pattern that matches a string that starts with any amount of spaces or tabs followed by "- [ ]" - local openpattern = "^%s*%- %[[ x]%]" + local openpattern = "^%s*%- %[[ ]%]" -- create a variable called closepattern with a pattern that matches a string that starts with any amount of spaces or tabs followed by "- [x]" - local closedpattern = "^%s*%- %[[ x]%]" + local closedpattern = "^%s*%- %[[x]%]" -- create a variable called titleopenpattern with a pattern that matches a string that starts with "# [ ]" - local titleopenpattern = "^# [ ]" + local titleopenpattern = "^# [ ] " -- create a variable called titleclosedpattern with a pattern that matches a string that starts with "# [x]" - local titleclosedpattern = "^# [x]" + local titleclosedpattern = "^# [x] " local line = vim.api.nvim_get_current_line()