Skip to content

Commit ba98745

Browse files
committed
Escape special characters in todo-keywords
1 parent 29321ae commit ba98745

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/orgmode/parser/section.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ function Section:_parse_todo_keyword()
625625
end
626626

627627
local keyword_info = todo_keywords.KEYS[keyword]
628-
self.title = self.title:gsub('^' .. keyword .. '%s*', '')
628+
self.title = self.title:gsub('^' .. vim.pesc(keyword) .. '%s*', '')
629629
self.todo_keyword = {
630630
value = keyword,
631631
type = keyword_info.type,

0 commit comments

Comments
 (0)