Closed malesa closed 7 years ago
None of my TODO's work. I tried both versions above.
I updated to the v0.9.3 and also had TODO's break. I had to roll back to v0.8.2 to get //TODO to work.
I've figured out something - there is a problem with a closing expression. It works if you put any closing signs, eg: // TODO: It also works */ So I've added a dot sign to the closing regular expression in the configuration and... // TODO: Now it works too. It seems that closing comments with line endind doesn't work. Maybe only on Windows?
with the latest version, it seems that the list does not refreshes well when switching between files. If add //TODO: and then save file, it will show in the list. If I move to another file and then goes back to older file with TODO then it shows blank list.
I've experienced something along these lines as well at least since v0.9.2. In my projects, only about one or two files are actually displaying TODOs and occasionally editing a TODO comment in one of the working files produced the behaviour @zishanj described.
Based on @malesa and @zishanj comments, I've found that it does seem like it has to do with Windows line terminations on files. Changing the suffix RegExp to
):? *(.*?) ?(?=\*/|\r\n|\n|$)
does seem to have helped.
Thanks. It works now.
Great! Thank you for helping out @patorpey!
Would you mind submitting a pull request with the changes?
That suggested regex may work for Windows users due to difference in LF characters. The \n
linefeed character should work on Mac because I have decoded the text and it shows that its using LF ASCII 10
which is probably \n
. Seems like the problem is somewhere else otherwise the default regex provided by Brackets would never work in first place, which I mentioned in previous comment.
Just an update... I have checked the default regex provided by Brackets on http://www.regex101.com and its working fine there. Seems like there is some issue with refreshing the TODO list dialog.
A fix for LF characters have been committed to master. This will hopefully solve the problems you guys are having. Could you test this on your setups?
It does not work if I switch between files, otherwise it works well.
PS: I am using Mac.
The commit for this has caused issue #142. Please see there for details.
A fix for this is in the just released version 0.9.5. Resetting the settings from the settings dialog uses the new defaults.
I don't know why comments // don't work. I have fresh plugin installation. Trying to put some todos in my JS file (.js extension) I've found that: / TODO: It works / // TODO: It doesn't work