Align doc comments, support single line // comments#1800
Open
let-def wants to merge 5 commits intoreasonml:masterfrom
let-def:line-comment
Open
Align doc comments, support single line // comments#1800let-def wants to merge 5 commits intoreasonml:masterfrom let-def:line-comment
let-def wants to merge 5 commits intoreasonml:masterfrom
let-def:line-comment
Conversation
jordwalke
reviewed
Feb 1, 2018
| @@ -0,0 +1,3 @@ | |||
| module JustString : { | |||
| include Map.S; // Comment eol include | |||
Member
There was a problem hiding this comment.
We will need to get the syntax highlighters to be updated. Vim should be good. But imagine if you had a brace or mismatched paren in a comment.
jordwalke
reviewed
Apr 9, 2018
| } | ||
|
|
||
| and enter_comment = parse | ||
| | "//" ([^'\010']* newline as line) |
Member
There was a problem hiding this comment.
@let-def Are there other kinds of newlines we need to watch out for (something like windows)?
Contributor
Author
There was a problem hiding this comment.
It should be compatible with windows. However, it might break with MacOs 9 😿 .
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactor the implementation of comments:
//are accepted.Comments are now indented inside
Easy_format, this enables a uniform treatment of all comments (normal comments, single line comments, doc comments, whether they are printed as atoms or attached to list wrappers).Hence the modifications to Easy_format.
pp_print_asis used to trickFormatto put newlines:pp_force_newlineforces a newline in the current box, while usingpp_print_aswith a size larger than the current margin puts the newline in the next box that receives content.To merge after #1799 .