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

Adding character before and/or after mustaches gives ugly output #6144

Open
AnthonyLenglet opened this issue May 22, 2019 · 3 comments
Open
Labels
lang:angular Issues affecting Angular template (not general JS/TS issues used for Angular) type:bug Issues identifying ugly output, or a defect in the program

Comments

@AnthonyLenglet
Copy link

Prettier 1.17.1
Playground link

--parser angular

Input:

<span class="mr-1">{{ 'should_outdate_translation' | i18n: 'Should outdate translations on save' | async }}:</span>

Output:

<span class="mr-1"
  >{{
    "should_outdate_translation"
      | i18n: "Should outdate translations on save"
      | async
  }}:</span
>

removing the character after the mustaches fixes it
Fixed Playground link

Expected behavior:

<span class="mr-1">{{
  "should_outdate_translation"
    | i18n: "Should outdate translations on save"
    | async
}}:</span>
@alexander-akait
Copy link
Member

/cc @AnthonyLenglet because not you line is more than 80 characters and prettier break code in multi lines

@alexander-akait alexander-akait added the status:awaiting response Issues that require answers to questions from maintainers before action can be taken label Aug 8, 2019
@no-response
Copy link

no-response bot commented Sep 5, 2019

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

@no-response no-response bot closed this as completed Sep 5, 2019
@j-f1
Copy link
Member

j-f1 commented Sep 5, 2019

This is what @AnthonyLenglet is referring to @evilebottnawi:

Prettier 1.18.2
Playground link

--parser angular

Input:

<span class="mr-1">{{ 'should_outdate_translation' | i18n: 'Should outdate translations on save' | async }}:</span>
<span class="mr-1">{{ 'should_outdate_translation' | i18n: 'Should outdate translations on save' | async }}</span>

Output:

<span class="mr-1"
  >{{
    "should_outdate_translation"
      | i18n: "Should outdate translations on save"
      | async
  }}:</span
>
<span class="mr-1">{{
  "should_outdate_translation"
    | i18n: "Should outdate translations on save"
    | async
}}</span>

@j-f1 j-f1 reopened this Sep 5, 2019
@j-f1 j-f1 added lang:angular Issues affecting Angular template (not general JS/TS issues used for Angular) type:bug Issues identifying ugly output, or a defect in the program and removed status:awaiting response Issues that require answers to questions from maintainers before action can be taken labels Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang:angular Issues affecting Angular template (not general JS/TS issues used for Angular) type:bug Issues identifying ugly output, or a defect in the program
Projects
None yet
Development

No branches or pull requests

3 participants