Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle comment delimiters not on same line as 'todo' keyword #119

Open
klein0r opened this issue Jun 8, 2022 · 4 comments
Open

Handle comment delimiters not on same line as 'todo' keyword #119

klein0r opened this issue Jun 8, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@klein0r
Copy link

klein0r commented Jun 8, 2022

Comments are defined like this:

..
    _This: is a comment!

..
    [and] this!

..
    this:: too!

..
    |even| this:: !

Additionally, support for https://www.sphinx-doc.org/en/master/usage/extensions/todo.html would be awesome

.. todo::
     This is a todo
@alstr
Copy link
Owner

alstr commented Jun 10, 2022

Interesting, thanks for the suggestion! It would definitely be good to add this; PR requests are always welcome for new languages, and they're relatively easy to do. This does look a little more complicated than the standard comment syntax. For one, at the moment if the comment delimiter is not on the same line as the 'todo' keyword/title, it won't get picked up, but that is something I am hoping to improve.

@alstr alstr added the add language A request to expand the action's supported languages. label Jun 10, 2022
@alstr
Copy link
Owner

alstr commented Aug 23, 2022

I've done some experimentation and the challenges to adding this at the moment are:

  • The lowercase todo (added support in latest commit)
  • The double colon after todo (at the moment it thinks the second colon is the title)
  • The fact that the formatting is somewhat unique; it isn't like a normal line comment as there is no comment delimiter on the second line, but it isn't a block comment as there's no closing tag.

The second one is an easy fix; the third is a bit more involved.

@silopolis
Copy link
Contributor

We'd surely be a bunch to welcome this addition!
Thanks for taking care of it :)

@alstr alstr added the enhancement New feature or request label Jun 28, 2024
@alstr alstr self-assigned this Jun 28, 2024
@alstr alstr added this to the v5 milestone Jun 28, 2024
@alstr alstr changed the title Add support for reStructuredText Handle comment delimiters not on same line as 'todo' keyword Jun 28, 2024
@alstr alstr removed the add language A request to expand the action's supported languages. label Jun 28, 2024
@alstr
Copy link
Owner

alstr commented Jul 11, 2024

The next version should support this style:

.. todo:: This is my issue title.

However, the below presents challenges I can't accommodate yet:

.. todo::

   This is another issue title and it
   breaks across multiple lines.

Mainly because the action doesn't associate those two lines as comments. This is something fundamental to how the action works, so no easy workaround currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants