alstr / todo-to-issue-action

Action that converts TODO comments to GitHub issues on push.
MIT License
630 stars 121 forks source link

Handlebars support #52

Closed nwhittaker closed 3 years ago

nwhittaker commented 3 years ago

Looking to resolve the following warning:

Could not check template.hbs for TODOs as this language is not yet supported by default.

For reference, the Handlebars commenting syntax: https://handlebarsjs.com/guide/#template-comments

alstr commented 3 years ago

Supporting the HTML style comment and {{!-- --}} syntax is simple enough, but adding both {{! }} and {{!-- --}} variants may create some potential for duplication. Also, any comments with handlebars in the body itself may get truncated.

I.e. we would have to make sure that this:

{{!-- This comment may contain mustaches like }} --}}

Doesn't get recognised as:

-- This comment may contain mustaches like

So I think with this it would be a case of limiting the supported syntax, and/or adding some additional logic to deal with the above.

alstr commented 3 years ago

I've added support for <!-- --> and {{! }}. The things I mentioned above are limitations that apply to other languages too, so I'm happy to put adding support for {{!-- --}} style under that issue.