Skip to content

#each loop forces inline arrays onto single line #490

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

Open
janosh opened this issue Apr 18, 2025 · 0 comments
Open

#each loop forces inline arrays onto single line #490

janosh opened this issue Apr 18, 2025 · 0 comments

Comments

@janosh
Copy link

janosh commented Apr 18, 2025

if i remove the <!-- prettier-ignore -->, the 3 already long lines wrap onto a single line

<!-- prettier-ignore -->
{#each [
  { id: `x-axis`, label: `X Axis`, selected_prop: x_property, log_state: log_x, prop_value: x_property_value, has_neg_vals: x_has_neg_vals },
  { id: `y-axis`, label: `Y Axis`, selected_prop: y_property, log_state: log_y, prop_value: y_property_value, has_neg_vals: y_has_neg_vals },
  { id: `color-axis`, label: `Color`, selected_prop: color_property, log_state: log_color, prop_value: color_property_value, has_neg_vals: color_has_neg_vals },
] as obj}
  <!-- markup here -->
{/each}

expected behavior: same wrapping as in rest of component, i.e. based on line width exceeding prettier.printWidth (= 90 in my case)

slightly related: #117

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