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

Fix space-before-conditional: false to work on switch-case statement #1881

Merged

Conversation

raobhavya92
Copy link
Contributor

@raobhavya92 raobhavya92 commented Jan 25, 2021

Description

  • Source branch in your fork has meaningful name (not main)

Fixes #1858

Before Merge Checklist

These items can be completed after PR is created.

(Check any items that are not applicable (NA) for this PR)

  • JavaScript implementation
  • Python implementation (NA if HTML beautifier)
  • Added Tests to data file(s)
  • [NA] Added command-line option(s) (NA if
  • [NA] README.md documents new feature/option(s)

@@ -2576,6 +2576,7 @@ exports.test_data = {
{ unchanged: 'if{{s}}(a) b()' },
{ unchanged: 'while{{s}}(a) b()' },
{ unchanged: 'do\n c();\nwhile{{s}}(a) b()' },
{ unchanged: 'switch{{s}}(a) b()' },
Copy link
Member

Choose a reason for hiding this comment

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

I would prefer this to be a valid switch/case statement, but the formatting works so... okay.

@bitwiseman bitwiseman merged commit 4738a1d into beautifier:main Jan 25, 2021
@bitwiseman bitwiseman changed the title Issue #1858- Space-before-conditional: false doesn't work on switch case statement Fix space-before-conditional: false to work on switch-case statement Jan 25, 2021
@bitwiseman bitwiseman added this to the v1.13.x milestone Jan 25, 2021
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

Successfully merging this pull request may close these issues.

space-before-conditional: false doesn't work on switch case statement(beautify.js)
2 participants