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

Preserve empty lines in CSS/SCSS paren groups #12210

Merged
merged 3 commits into from
Feb 2, 2022

Conversation

duailibe
Copy link
Member

@duailibe duailibe commented Feb 1, 2022

Description

Related to #12053, will improve the comment placement from the example in another PR

Checklist

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory).
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

Copy link
Member

@sosukesuzuki sosukesuzuki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add tests for multi empty lines?

Prettier pr-12210
Playground link

--parser scss

Input:

$colours: (
    "text": $light-100,
    "background-primary": $dark-300,






    "background-secondary": $dark-200,
    "background-tertiary": $dark-100
);

Output:

$colours: (
  "text": $light-100,
  "background-primary": $dark-300,

  "background-secondary": $dark-200,
  "background-tertiary": $dark-100,
);

changelog_unreleased/css/12210.md Outdated Show resolved Hide resolved
changelog_unreleased/css/12210.md Outdated Show resolved Hide resolved
changelog_unreleased/css/12210.md Outdated Show resolved Hide resolved
@duailibe duailibe merged commit e22c491 into prettier:main Feb 2, 2022
@fisker fisker mentioned this pull request Mar 25, 2022
4 tasks
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants