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

Don't mix comments and docstrings #2372

Merged
merged 2 commits into from Jun 8, 2023
Merged

Conversation

Julow
Copy link
Collaborator

@Julow Julow commented Jun 8, 2023

What is a docstring is now dictated by the lexer, which removes a class of bugs and remove some ugly code.

Comments and docstrings can still easily be mixed and the is_docstring function is still necessary to handle ocp-indent-compat. This is improved on in #2371, from which this PR is extracted.

Julow added 2 commits June 8, 2023 10:29
Preliminary to changing its representation.
Comments and docstrings no longer have to be differentiated before
formatting. Concatenating "*" to docstrings is no longer necessary.

Some comments starting with `(**` were in fact not docstrings.
What is a docstring is now dictated by the lexer, which removes this
kind of bug.
@Julow Julow added the no changelog set this to bypass the CI check for changelog entries label Jun 8, 2023
Copy link
Collaborator

@gpetiot gpetiot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Julow Julow merged commit 6a78793 into ocaml-ppx:main Jun 8, 2023
9 of 11 checks passed
Julow added a commit to Julow/ocamlformat that referenced this pull request Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog set this to bypass the CI check for changelog entries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants