Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Notifier] do not display todo doc on site #17627

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

Merged
merged 1 commit into from
Dec 30, 2022

Conversation

MrYamous
Copy link
Contributor

I've noticed on bottom of Notifier page a todo block displayed on site, just a small change to hide it

@OskarStark
Copy link
Contributor

This should be parsed differently by the docs-builder @weaverryan

@MrYamous
Copy link
Contributor Author

This should be parsed differently by the docs-builder @weaverryan

Do you think it's a parsing issue ? Syntax seems to be incomplete regarding others todo block

@OskarStark
Copy link
Contributor

Do you think it's a parsing issue ? Syntax seems to be incomplete regarding others todo block

Yes, because before, when we use Sphinx to render the docs, this todo was not rendered, now while using the new symfony-tools/docs-builder it shows up...

cc @nikophil

@nikophil
Copy link
Contributor

nikophil commented Dec 29, 2022

Hello,

the problem comes from the rst parser.

rst language reference says comments could look like this, which works with the parser:

.. This is a comment

or this, which is not considered as a comment and is a bug in the parser

..
    this is a comment

they don't give an example for this kind of block (not even in sphinx doc)

.. first comment
    still a comment in the same block

but they do provide a "syntax diagram" which makes me think this should also be considered as a comment:

+-------+----------------------+
| ".. " | comment              |
+-------+ block                |
        |                      |
        +----------------------+

Still, if Sphynx did consider the later as a block comment, maybe this behavior could land in the parser as well.
Moreover, the way that GitHub and PHPStorm highlights the syntax proves this kind of "comment block" should be handled by the parser:

.. I am a comment and appear in grey
   I am also in grey, so I am a comment
I am not in grey, because I am not a comment

I've open a PR the rst repository
doctrine/rst-parser#220

@nikophil
Copy link
Contributor

PR is merged, let's wait for them to release the patch 😊

@nikophil
Copy link
Contributor

@OskarStark @weaverryan The PR has been released in 0.5.3
I don't know how the release of the docs builder is made (a phar creation I guess....).
But upgrading the rst parser inside de docs builder will fix this issue

@javiereguiluz
Copy link
Member

Thanks Matthieu.

@javiereguiluz javiereguiluz merged commit db74d6d into symfony:5.4 Dec 30, 2022
@javiereguiluz
Copy link
Member

@nikophil thanks! I've tagged a new version of symfony/docs-builder too, so we'll get your latest fixes.

@MrYamous MrYamous deleted the notifier/do-not-display-todo branch March 8, 2023 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants