-
Notifications
You must be signed in to change notification settings - Fork 729
Open
Description
I've found two bugs:
- Special symbols, cyrillic letters, simplified chinese hieroglyphs and possibly even more non-latin characters which are inside projects, contexts and key:values make todo.sh treat those as task descriptions and ignore highlighting for those.
Whilelsprjandlsccommand treat those as projects/contexts. - Some key:values containing several colons are highlighted as key:values whire they are not referring to todo.txt standard.
Environment:
OS: GNU/Linux
todo.sh version: 2.13.0
Bash version: 5.3.3-2
Awk implementation: gawk 5.3.2-1
Steps to reproduce:
- Invoke
todo.sh lson the following TODO_FILE:
2024-01-01 абв где ёжз +ИКЛ
икл мно прс @ТУФ
2025-11-27 tell about bug in todo.sh +абвГдеЁжз
@иклМноПрс
να ξαπλώσω στο μπάνιο και να φωνάξω +εύρηκα
:) @---
2025-11-26 @+++
++++ @@@@
Visit Bolshoi theater +Москва
购买蔬菜 +首都
Catch white nights in June 2026 +Санкт-Петербург
首都:都首
аБ:вГ 123456
a::::b is highlighted as KV
AB20 4834 CCED 2210 <>:<> is not highlighted as kv
-:+
2025-05-30 {} (:)
|:-0 is not highlighted as KVThis will cause projects and contexts of those entries to be highlighted as tasks' description parts, while they are not. Cases with key:values are described in the rows themselves.
The problem is in the wrong awk command logic in highlight() function. Changing projects and contexts regexps inside the for loop from /^[+].*[A-Za-z0-9_]$/ to /^[+].+$/ (with [@] for contexts) and from /^[A-Za-z0-9]+:[^ ]+$/ to /^[^:\S]+:[^:\S]+$/ for key:values seems to solve this issue.
Metadata
Metadata
Assignees
Labels
No labels