Skip to content

formatter: Diff with Prettier on angular multiline interpolation #16702

Description

@mattlewis92

Input

Filename foo.component.html (angular component template)

<div>
  <div>
    Delete {{ customRole.name }} ({{
      customRole.inherited_role | roleToString
    }})
  </div>
</div>

Config

{
  "$schema": "./node_modules/oxfmt/configuration_schema.json",
  "singleQuote": true,
  "printWidth": 80
}

Oxfmt output

Oxfmt version: 0.17.0 (adds new line before the end of interpolation)

<div>
  <div>
    Delete {{ customRole.name }} ({{
      customRole.inherited_role | roleToString

    }})
  </div>
</div>

Oxfmt playground link

No response

Prettier output

Prettier version: 3.7.3 (output remains unchanged)

<div>
  <div>
    Delete {{ customRole.name }} ({{
      customRole.inherited_role | roleToString
    }})
  </div>
</div>

Prettier playground link

https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeAJgSwG4D4A6UABERjgcSUQCJwA2c8RwwRYArgM4wQC2AShAYA6KAENecIgF9pRABQtCVKh259BIzFAAWcAE6Z46APr6hUgD5FzDACoQAyjENQA5sqqyAlJ9QB6LDxCAKCKEAAaEAgABxhMaE5kUDF9cwB3AAVUhCSUMTp0sQBPJKiAI30xMABrRkcJOAAZbThkADMCzjgoiHKAKzgwGAB1KpjkEBj9OG79bDaKqtr6mOrtN2QXdh6Qbt5MLf0dqLgADxiDTElYAoB5S6qefUyITiMEqEmEdEiQc8e1wQMAKdgM4kMsw6XV273cDAAiuwIPBoXRulF+pwzo4NojkaikJ10bsAI4EuCZcwxPIgMScAC0UDgcHQrL+LjEmDoGwAwnxeGJJgU6H84W4GABBGAuTDldjwTIGFrMtEYkA6GC8OgjHRGWZrMBwRy5D7YIzFSZgThlEDYHYASSgbNgjjAhjikudzmKDDVu2mbzgYzEExQ01mBgWfx+d3aKraKDo7T+2jmMCpYjcgv9UTW+jmwvc7DoqT+020o0w6BgOmQAA4AAxRGbkzAzTPZoVEmFREHlEbV2vIABMUS4cDsYnKeWJ6rgvHKrLZ6CaYmLWbgADEIPpBTKNsKFRAQLIgA

Additional notes

No response

Metadata

Metadata

Assignees

Labels

Type

Fields

Priority

None yet

Effort

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions