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

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

Open
cookiecrook opened this issue Jul 17, 2024 · 3 comments
Open

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

cookiecrook opened this issue Jul 17, 2024 · 3 comments
Assignees
Labels
Agenda-Editors editorial a change to an example, note, spelling, grammar, or is related to publishing or the repo

Comments

@cookiecrook
Copy link
Contributor

Describe your concern

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

Link to the commit

be75e58

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 cookiecrook added the editorial a change to an example, note, spelling, grammar, or is related to publishing or the repo label Jul 17, 2024
@pkra
Copy link
Member

pkra commented Jul 17, 2024

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

@jnurthen
Copy link
Member

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

@MelSumner
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Agenda-Editors editorial a change to an example, note, spelling, grammar, or is related to publishing or the repo
Projects
None yet
Development

No branches or pull requests

4 participants