Closed dynamicdan closed 10 years ago
I believe that the problem you're experiencing is because of the single backslash in "*". Since the JSON file is read by JavaScript as a string the two backslashes is required as the first one is escaped.
Try using the following in your .todo file.
{
"regex": {
"prefix": "(?:\\/\\*|\\/\\/|#|\\*) *(?:!DD)* *@?("
}
}
Were you able to get this to work @dynamicdan?
Thanks! That did work. Ah, regex is wonderful when you can understand how it works.
It can be a bit tricky but quite powerful once you get it.
I'm looking into making these kind of tweaks easier but keeping it as flexible at the same time makes it a bit hard.
You might have enough data now to provide some presets or templates to turn on/off? You could still keep the regex as a fallback for the pros. If all else fails then a simple wiki page where devs can add their regex solutions would probably work quite well as a reference. The readme could link to a reference wiki page for various regex tips.
There will probably be a dropdown with some presets and then a custom setting where you can enter the reg exp you wish to use.
How do I match something like this?
The default regex failed to pick it up. I need the default PLUS this flexible comment style. Note that although consistent commenting would be nice, it's not always possible in big/strange projects.
I tried to modify the default but it failed... ( |* )
Perhaps this is not possible?
BTW, the "jsDoc / phpDoc Syntax" example failed to do anything useful for me. PS: I updated tags to include "!DD". !DD is a marker used in coda for a similar todo feature.