Additional spaces in pipe when use angular parser
See original GitHub issuePrettier 2.7.2 [Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeGBXAlgWgDZZRw5gAWAhgE4wA6UABI-QFRQDmAYhJQLw0h44MemSrCIAM3oATcgE8AzvzpMRecgoV9wFasoZMA2qThY2pGAF1tAJgAMd-asMB3LNJilr-NkIDq7p4AFJTk7HAAlE5GAG7keBhw3jpi9AA+9JhYHFh48JT0SPQSufmF9KHh6ZnYALLkAA4NcAVFMBAAchgAtgBGLQrllb76AHyoAPRZ+ITEotSjdCAANCAQDTBY0ArIoFSUEC4AClQIOyjxLvI7q72hYADWQgDK5N1wADKzyBLxCnC3e5PGDPBrkMCENjIGCURKrOB9ODSaRIj5hNgYci+LiUbrkGCbdjIEDkDDtFYgCzdPB+UhYeAKMFgODPM70rAxelyYlgTQUwj-ahHUJsPE-P4AkAAKwUAA9npDBABFDAQeDivD-VZgyiC4nojDqSgUhqUQgwAIeUjIACM9m1B3+flCDWJprggpicApAEdVfBhetziSFDgiEikRTKHA-Vho8KsWKkL9NZL-t0sNDYWnFXAVWrvcmJasYORepbPMgbCXQrlIQBhCDdJMgD0AVgpGH+ABUy+cU1qQDFEgBJKAo2DPMBmjYAQXHzxgckEGv+AF810A)
# Options (if any):
--parser angular
Input:
<tui-line-chart
*ngFor="let chart of days"
class="chart"
[height]="200"
[width]="getWidth(range)"
[value]="chart | tuiFilter : filter : range | tuiMapper : toNumbers : range"
></tui-line-chart>
Output:
<tui-line-chart
*ngFor="let chart of days"
class="chart"
[height]="200"
[width]="getWidth(range)"
[value]="chart | tuiFilter: filter:range | tuiMapper: toNumbers:range"
></tui-line-chart>
Expected behavior:
I feel it’s much better to read with spaces.
[value]="chart | tuiFilter : filter : range | tuiMapper : toNumbers : range"
Issue Analytics
- State:
- Created a year ago
- Reactions:39
- Comments:13 (5 by maintainers)
I’m a GDE for Angular too 🙂 I’ve asked @splincode to raise this issue when he enabled Angular as template parser for prettier in our huge open source library Taiga UI and we all were confused by how weird it looks without spaces 🙂
@sosukesuzuki It’s a shame this issue was not discussed more thoroughly. Opinions of a few Taiga UI users should not overweight all the examples in the official Angular documentation, where pipes are separated with spaces, and pipe arguments stand close to pipe names:
not