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] Possible bug breaking to multiple lines unexpected in <template> #297

Open
kategengler opened this issue Nov 21, 2024 · 0 comments
Open

Comments

@kategengler
Copy link

kategengler commented Nov 21, 2024

🐞 Describe the Bug

A clear and concise description of what the bug is.

🔬 Minimal Reproduction

Describe steps to reproduce. If possible, please create a PR with a failing test as described in CONTRIBUTING.md.

😕 Actual Behavior

A short line (33 cols) is being reformatted to two lines:
{{driveTime}} minute becomes

{{driveTime}}
minute

full example:

import Component from '@glimmer/component';
import powerSelect from 'ember-power-select/components/power-select';

import { driveTimeOptions } from 'my-app/constants';

export default class SearchForm extends Component {
   // ...
  <template>
    <div>
      <h2>
        Your Search
      </h2>

      <form>
        Show me results with
        <div>
          <powerSelect
            @dropdownClass='text-trigger'
            @triggerClass='_trigger'
            @matchTriggerWidth={{false}}
            @name='time'
            @onChange={{this.updateDriveTime}}
            @options={{driveTimeOptions}}
            @placeholder='15 minute'
            @searchEnabled={{false}}
            @selected={{this.driveTime}}
            as |driveTime|
          >
            {{driveTime}} minute {{! This goes to two lines with prettier, but why? }}
          </powerSelect>
        </div>   
  </template>
}

🌍 Environment

  • prettier-plugin-ember-template-tag version: - 2.0.4
  • ember-template-imports version (if applicable): - 4.2.0
  • content-tag version (if applicable): -
  • eslint-plugin-ember version (if applicable): - 12.3.1

➕ Additional Context

Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant