atom / language-todo

TODO highlighting package for Atom
Other
80 stars 66 forks source link

Doesn't detect todo in // type comments in stylus files #33

Closed zenopopovici closed 8 years ago

zenopopovici commented 9 years ago

Eg.

[... Code ...]

// TODO: Blahblah

[... Code ...]

Is this intentional?

kevinsawicki commented 9 years ago

What language was the code in that you aren't seeing it highlight in?

zenopopovici commented 9 years ago

This only happens in stylus files. I've tested across some other files.

vchynarov commented 8 years ago

This also does not work in Scala files. // TODO HACK REVIEW is not highlighted.

nixel2007 commented 8 years ago

Doesn't work for language-1c-bsl files too. Is there something, that is needed to add in the "parrent" grammar to make things work?

mcrawshaw commented 8 years ago

Same behaviour in typescript (either .ts or .tsx files)

asifm commented 8 years ago

Doesn't' work in markdown (source.gfm) either.

winstliu commented 8 years ago

Having just fixed this in language-coffee-script, I can share some things that need to be done in order for TODO highlighting to work correctly.

The comment matches cannot be a simple match regex, eg match: '(#).*$', as that won't allow language-todo to inject itself in that match. Instead, it has to be a begin/end pattern. https://github.com/atom/language-coffee-script/commit/ad0aa553d8f91ca1c4605da0bce5bcaf66c3e2bd

As this is most likely a problem with individual grammar files and not language-todo itself, I'm closing this.

nixel2007 commented 8 years ago

@50Wliu thanks a lot.