Suboptimal binary + operator formatting
See original GitHub issueThis strikes me as a really ugly format:
$ echo "lots + of + additions + are + put + into + some + weird + format + thats + ugly > 0" > /tmp/test.js && prettier /tmp/test.js
lots + of + additions + are + put + into + some + weird + format + thats +
ugly >
0;
Better would be:
lots + of + additions + are + put + into + some + weird + format + thats +
ugly > 0;
Do you agree, or is this intentionally the format used by prettier?
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
PEP 460 – Add binary interpolation and formatting
PEP 460 – Add binary interpolation and formatting ... This PEP proposes to add minimal formatting operations to bytes and bytearray objects.
Read more >Define a binary operator such that in displaymath subscripts ...
I would like to change the definition of \tensor and \comptensor such that in textstyle nothing changes, but in displaystyle I would like...
Read more >How to get 0-padded binary representation of an integer in java?
I think this is a suboptimal solution, but you could do. String.format("%16s", Integer.toBinaryString(1)).replace(' ', '0').
Read more >Auto-formatting handles multi-line binary operations in strange ...
Auto-formatting handles multi-line binary operations in strange manner. 2. Is duplicated by 1. Is duplicated by 1 issue (0 unresolved).
Read more >Line break occurred before a binary operator (W503)
Line breaks should occur after the binary operator to keep all variable names aligned. This rule goes against the PEP 8 recommended style,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That’s not intentional, and is ugly. Binary operators are a bit difficult to get right. We can play with this.
Heck, with a quick hack I was able to implement something like this:
I will follow-up in the PR.