-
Notifications
You must be signed in to change notification settings - Fork 94
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
Normalize whitespaces in codespans #1085
Normalize whitespaces in codespans #1085
Conversation
Please avoid referencing non-public propositions in a public project.
That's quite an odd convention. If you want to change the current behaviour (not sure what it is) I think you should rather ignore all whitespace (and make sure you can introduce one with an escape). |
How will this affect mdx? |
Sorry I misunderstood, I thought it was for code blocks. What you propose is fine with me (and FWIW indirectly what CommonMark does). |
Also I don't think this should be done. |
There won't be any impact, mdx doesn't process code spans, only the code blocks |
For the records, here is the issue this PR is solving. Citing @Julow (private conversation):
See also this PR for the discussion on the ocamlformat side. |
As I said I don't think initial and trailing whitespace should be suppressed. 1) There may be legitimate reasons to have some 2) It needlessly deviates from other lightweight markup languages like CommonMark. |
Maybe this PR could be split in two:
so one modification is not blocking the other? I think having the syntax for inline elements play nice with the "80 char rule" is good to have, so I would be in favor of the first change. I haven't though about the second change, but as a first impression I would be in favor of having the same behavior as CommonMark. |
I removed these changes and cleaned up the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a small mention of that in the docs could be good! Odoc's language is underspecified but let's slowly improve that...
Co-authored-by: panglesd <[email protected]>
Promoted tests and updated docs, and then it's mergeable! |
Signed-off-by: Paul-Elliot <[email protected]>
Signed-off-by: Paul-Elliot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is ready to be merged. I'll let a few days before merging to let anyone who dislike the change speak up.
Looks good to me. In it goes! |
To summarize:
Consecutive whitespaces not after a newline are conserved as they are.