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

Properly re-indent comments. #44

Open
jordwalke opened this issue Jan 14, 2016 · 1 comment
Open

Properly re-indent comments. #44

jordwalke opened this issue Jan 14, 2016 · 1 comment
Labels
KIND: FEATURE REQUEST Printer things that have to do with turning an AST into Reason code

Comments

@jordwalke
Copy link
Member

One issue that's going to come up when converting code from OCaml, and also when indenting your own code (but less likely), is that comments now begin in a new column, and therefore must be shifted over.

Right now, we just copy the entire comment including newlines, but shift the starting column over. See the screenshot for how that will lead to improperly indented comments.

screen shot 2016-01-13 at 11 12 21 pm

We should indent the entire comment over by the same amount that we are shifting the first line.

Here's an example of the formatter running on an existing comment.

@jordwalke jordwalke mentioned this issue Jan 20, 2016
3 tasks
@jordwalke
Copy link
Member Author

@cristianoc - I noticed that this happens occasionally when converting a big project from ML - and I am tackling this right now. It will make the results much more beautiful.

@jaredly jaredly added KIND: FEATURE REQUEST Printer things that have to do with turning an AST into Reason code labels Jun 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
KIND: FEATURE REQUEST Printer things that have to do with turning an AST into Reason code
Projects
None yet
Development

No branches or pull requests

2 participants