aria icon indicating copy to clipboard operation
aria copied to clipboard

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

Open cookiecrook opened this issue 1 year ago • 2 comments

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.

cookiecrook avatar Jul 17 '24 09:07 cookiecrook

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

pkra avatar Jul 17 '24 09:07 pkra

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

jnurthen avatar Jul 29 '24 23:07 jnurthen

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.

MelSumner avatar Sep 25 '24 20:09 MelSumner

This was hopefully addressed by #2342.

pkra avatar Oct 28 '24 16:10 pkra