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

Add priority to soft-breaks #8

Open
ilya-epifanov opened this issue Mar 1, 2014 · 2 comments
Open

Add priority to soft-breaks #8

ilya-epifanov opened this issue Mar 1, 2014 · 2 comments

Comments

@ilya-epifanov
Copy link

e.g.:

in

"a" </> "+" </> + "b" </> " = " </> "c" </> "/" </> "d"

one of the soft breaks around equals sign should have higher priority, so that

a + b
= c / d

or

a + b =
c / d

is printed instead of

a + b = c
/ d
@ilya-epifanov
Copy link
Author

IMO, the best looking solution would be

("a" </> "+" </> + "b") </> " = " </> ("c" </> "/" </> "d")

which should mean that both spaces around equals sign have high priority, but soft breaks within expression can still trigger nevertheless.

@hvr
Copy link

hvr commented Aug 18, 2015

please migrate to https://github.com/ekmett/ansi-wl-pprint/issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants