Skip to content

Html Angular formatting removes necessary parentheses #5535

@runeabrahams1

Description

@runeabrahams1

Prettier 1.15.2
Playground link

--parser angular

Input:

  {{ "test" | translate:lang: { x: (list || list2)?.length } }}

Output:

{{ "test" | translate: lang:{ x: list || list2?.length } }}

Expected behavior:
Input should be equal output, but the () is removed around list or list2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang:javascriptIssues affecting JSlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.priority:highCode is printed in a way that alters the AST, breaks syntax, or is a significant regression. Urgent!status:has prIssues with an accompanying pull request. These issues will probably be fixed soon!

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions