Your task number in task group can be incorrect
I-Iugo opened this issue · comments
Hugo commented
For example when you add, remove and add the last task the task number in task groups is false. It's because if you regex in view/task_group_list.haml:l37
is bad /\d/
--> /\d+\
.
[1] pry(#<Sinatra::Application>)> task_group.tasks
=> "[\"7\", \"8\", \"11\"]"
[3] pry(#<Sinatra::Application>)> task_group.tasks.scan(/\d/)
=> ["7", "8", "1", "1"]
[2] pry(#<Sinatra::Application>)> task_group.tasks.scan(/\d/).size
=> 4
### Fixed
[5] pry(#<Sinatra::Application>)> task_group.tasks.scan(/\d+/).size
=> 3
I'll send you a PR for this.
Hugo commented
It has been merged