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

Skip to content

Allow block of comments #220

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 29, 2022
Merged

Conversation

nikophil
Copy link
Contributor

@nikophil nikophil commented Dec 29, 2022

Hello,

this PR refers to this problem in symfony's docs
symfony/symfony-docs#17627

the parser currently does not understand "comments blocks"

..
  this is a comment

or "comments block with header"

.. header comment
   this is a comment

not a comment anymore

see RST docs: https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#comments

@nikophil nikophil force-pushed the issue/comments-block branch from 53fa8f6 to 8d2a6a7 Compare December 29, 2022 09:29
@nikophil nikophil changed the title failing test case for comment block Allow block Dec 29, 2022
@nikophil nikophil changed the title Allow block Allow block of comments Dec 29, 2022
@nikophil nikophil force-pushed the issue/comments-block branch 2 times, most recently from 6a46bb9 to 03525ff Compare December 29, 2022 09:36
@greg0ire greg0ire requested a review from wouterj December 29, 2022 10:43
@greg0ire
Copy link
Member

Cc @linawolf since you are involved a lot with this lib lately, please review

@linawolf
Copy link
Collaborator

I would suggest to also add a test for an empty comment, see https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#empty-comments

@nikophil nikophil force-pushed the issue/comments-block branch from 03525ff to 0f7f0c7 Compare December 29, 2022 14:12
@nikophil
Copy link
Contributor Author

done

@linawolf
Copy link
Collaborator

I would add:

..

    This is an empty comment followed by a blockquote

@nikophil nikophil force-pushed the issue/comments-block branch from 0f7f0c7 to 4d1a78e Compare December 29, 2022 15:56
@nikophil
Copy link
Contributor Author

nikophil commented Dec 29, 2022

I don't understand... your example actually is a comment:

..
   I am a comment because of the indentation (that's why I'm colored in grey by GitHub)
I am not a comment: the "comment block" was ended because no indentation is used (and GitHub colors me in white)

this case is covered by comments-block test case.

@linawolf
Copy link
Collaborator

linawolf commented Dec 29, 2022

Have a look at https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#empty-comments
An empty line stops the comment even if the following line is indented.

This is
  a definition list.

..

  This is a block quote.

vs

This is
  a definition list.

..
  This is a comment, do not display me.

@nikophil nikophil force-pushed the issue/comments-block branch from 4d1a78e to a4e1f90 Compare December 29, 2022 16:17
@nikophil
Copy link
Contributor Author

nikophil commented Dec 29, 2022

sorry for the misunderstanding!

I've updated comment-empty test case

@greg0ire greg0ire merged commit 9142491 into doctrine:0.5.x Dec 29, 2022
@greg0ire
Copy link
Member

Thanks @nikophil!

@nikophil nikophil deleted the issue/comments-block branch December 29, 2022 16:23
@greg0ire greg0ire added this to the 0.5.3 milestone Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants