-
Notifications
You must be signed in to change notification settings - Fork 6
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
Fix choice indent #16
Conversation
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.
do you plan to address all those choice indent issues in this PR or only some?
"0" ~ ("1" // a comment | ||
| "2" // another comment | ||
| "3" // longer comment | ||
| "4" // final comment |
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.
not sure if correct to align the comment like that -- the original feedback was that the intention was to put the "final comment" on top of "a" (or "5" in log_line3), but formatting makes it look like that it's attached to the previous line ("4" instead of "a" or "5")
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.
I didn't try to improve the comment style for this case, but focused on ensuring alignment and avoiding loss.
"1" ~ ("2" // another comment | ||
| "3" // longer comment | ||
| "4" // final comment | ||
| "5" | "a" | "b" | "c" | "d" | "e") // comment |
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.
will this split up the choices if there was more of them, so that it is not too long vertically?
The original feedback mentioned there may be too many choices:
the line that starts with pair35 in the output doesn't scale if there are lots and lots of rules.
In my real output - I ended up with a vertical formatted input with one of the output lines being 634 characters long (593 up to the comment).
This PR just fixes serious issues: A. The first comment inside
B. When comment after a choice, the indent have a one more space.
after
|
In original question of he wants. Raw text:
Expected:
Current result:
If there are no comment inside the expression, the format result is ok:
I know that, but we're going to fix this is complex, I need to thinking about how to implement it. Maybe it will take a lot of time. |
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.
ok, will merge this one first
Fix #15