File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ function File:find_headlines_by_title(title, exact)
208
208
if exact then
209
209
pattern = pattern .. ' $'
210
210
end
211
- return item . title :lower ():match (pattern )
211
+ return item : get_title () :lower ():match (pattern )
212
212
end , self .sections )
213
213
end
214
214
Original file line number Diff line number Diff line change 607
607
608
608
--- @private
609
609
function Section :_parse ()
610
- self :_parse_todo_keyword ()
611
610
self .priority = self .line :match (self .todo_keyword .value .. ' %s+%[#([A-Z0-9])%]' ) or ' '
611
+ self :_parse_todo_keyword ()
612
612
end
613
613
614
614
--- @private
@@ -634,6 +634,14 @@ function Section:_parse_todo_keyword()
634
634
}
635
635
end
636
636
637
+ function Section :get_title ()
638
+ if not self :has_priority () then
639
+ return self .title
640
+ end
641
+ local title = self .title :gsub (' ^%[#([A-Z0-9])%]%s*' , ' ' )
642
+ return title
643
+ end
644
+
637
645
function Section :_update_date (date , new_date )
638
646
date = date :set ({
639
647
year = new_date .year ,
You can’t perform that action at this time.
0 commit comments