Closed JustinTheClouds closed 10 years ago
The instructions for using JSDoc-style comments can be found at Custom Settings.
I tried it with those settings too. No luck though :/
I believe there is an error in the JSDoc style example. I'm not very good with regex so I don't see it. But I was debugging and I noticed that when I try to use the JSDoc regex given, it defaults back to the default .todo settings all together and ignores the projects .todo file.
I did though get it working by adding this to the end of the default prefix regex
|\\*
So I ended up with
"prefix": "(?:\\/\\*|\\/\\/|#|\\*) *@?(",
I hope this doesn't match any other code throughout my files that shouldn't be matched. So far so good.
Sorry for slow response time. Your initial problem was because of the multiline limitation but the JSDoc example @sbruchmann linked to should work for the @todo
comments.
That said, I looked at your given code example and took the opportunity to make some adjustments to the JSDoc example. Please try the code below in your .todo
file instead. It might be a bit slower (shouldn't be noticeable though) but will identify all the comments in your example.
{
"regex": {
"prefix": "(?:\\* *@*)(",
"suffix": "):? *(.*?) ?(?=\\n)"
}
}
I'm guessing this is just a regex issue?
I notice you have a note that says multiline comments will not work and it will only return the first line of the comment. I assume that note was only for comments like the one below?