ansi-wl-pprint icon indicating copy to clipboard operation
ansi-wl-pprint copied to clipboard

Add priority to soft-breaks

Open ilya-epifanov opened this issue 10 years ago • 2 comments

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 avatar Mar 01 '14 17:03 ilya-epifanov

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.

ilya-epifanov avatar Mar 01 '14 17:03 ilya-epifanov

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

hvr avatar Aug 18 '15 10:08 hvr