w3c / aria

Accessible Rich Internet Applications (WAI-ARIA)
https://w3c.github.io/aria/
Other
654 stars 125 forks source link

Prettier removed a line break from a pre-formatted code example #2286

Closed cookiecrook closed 3 weeks ago

cookiecrook commented 4 months ago

Describe your concern

Prettier removed a line break from a pre-formatted code example

Link to the commit

https://github.com/w3c/aria/pull/2284/commits/be75e5864fb12e61b9997539692a34391b58dd15

In this particular case, it might not matter, but this has the potential to cause problems with other diffs.

For what it's worth, I think the line breaks it added elsewhere were also undesirable.

pkra commented 4 months ago

Prettier should generally leave PRE elements alone. Maybe the action is not using an up to date version. Needs investigating.

jnurthen commented 3 months ago

we could add // prettier-ignore before pre blocks if we can't work out how to make it work automatically

MelSumner commented 1 month ago

Here's what I can find:

Prettier cannot ignore specific elements globally through its configuration file. You’ll need to rely on the prettier-ignore comments for now.

pkra commented 3 weeks ago

This was hopefully addressed by #2342.