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

Bug: removes 2nd block with angular interpolation #78

Open
valera33 opened this issue Mar 10, 2020 · 2 comments
Open

Bug: removes 2nd block with angular interpolation #78

valera33 opened this issue Mar 10, 2020 · 2 comments
Labels
framework: Angular Related to the framework Angular help wanted We are looking for community help type: bug Functionality that does not work as intended/expected

Comments

@valera33
Copy link

Info

Tool Version
Plugin v1.1.9
Prettier v1.19.1
Node v13.6.0
OS linux

Input

foo(title="{{'something' | translate}} - {{'something else' | translate}}")

Output or Error

foo(title="{{ 'something' | translate }}")

Expected Output

foo(title="{{ 'something' | translate }} - {{ 'something else' | translate }}")
@Shinigami92 Shinigami92 self-assigned this Mar 10, 2020
@Shinigami92 Shinigami92 added framework: Angular Related to the framework Angular type: bug Functionality that does not work as intended/expected labels Mar 10, 2020
@Shinigami92
Copy link
Member

Shinigami92 commented Mar 10, 2020

I think that thats coming from starts and ends with {{...}}
Have to check the middle of the string

export function isAngularInterpolation(val: string): boolean {

Hope I have time for this soon

@Shinigami92
Copy link
Member

At that time, I'm going to release a hotfix for this issue: 1968c8c

However, this only suppresses formatting if there is more than one binding within an attribute value. Therefore you have to format them yourself.

@Shinigami92 Shinigami92 removed their assignment Oct 7, 2020
@Shinigami92 Shinigami92 added the help wanted We are looking for community help label Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
framework: Angular Related to the framework Angular help wanted We are looking for community help type: bug Functionality that does not work as intended/expected
Projects
None yet
Development

No branches or pull requests

2 participants