keithfancher/todo-indicator

White spaces

sonjli opened this issue · 1 comments

Hi,
when I click on an item with spaces at the end of the line (or at the beginning, but it's less common mistake) the file is not update with an "x".
I think this is because in "_check_off_item_with_label" the check with the file line is made without "strip".
I made these chages and everything goes right:
old line 120: if line.strip() == label:
modified line 120: if line.strip() == label.strip():

I hope this helps.
Thanks for the good and useful script!

Hey, thanks! I just pushed your fix.