tickgit
tickgit copied to clipboard
multiple problems with multiline JS comments
using this JS file
// TODO: a thing
// todo lower case thing
/* foo
TODO: in multiline comment
TODO tab indented in multiline comment
TODO: space indented in multiline comment
*/
the output for the multiline section is
TODO: foo
in multiline comment
tab indented in multiline comment
space indented in multiline comment
problems: a) "foo" has nothing to do with the todo b) leading whitespace shouldn't be displayed c) none of the TODO items are actually highlighted as TODOs like normal output. instead they're under "foo" which isn't even a todo thing.
Hi @masukomi thanks for bringing up, and apologies for not responding sooner! The behavior you're describing is "expected," but certainly flawed. There's a couple of odd things I'd like to fix up.
- The entire comment a
TODOstring is in gets saved as the TODO, hencefoois included in the output, since the entire block comment is saved - The
TODOstring is stripped out of the comment, sometimes making for odd output, especially when theTODOis in the middle of a line or phrase. This displays ok for whenTODOstarts the comment or line, but as you point out, is bizarre when there's an indent or it appears somewhere else in the comment
I'd like to experiment a bit, but I think with some more sensible parsing within the comment we should be able to clean this up a bit!