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

stop reformatting valid css \! into invalid \ ! #1656

Merged
merged 2 commits into from Apr 8, 2019

Conversation

averydev
Copy link
Contributor

@averydev averydev commented Apr 7, 2019

Description

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

Fixes Issue:

CSS allows escape of the ! character in class names i.e. .blue\!, which would be applied to

<div class="blue!" />

However, the logic to put a space before !important resulted in generating invalid css .blue\! { turned into .blue\ ! {

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)
    N/A --- Added command-line option(s) (NA if -- NA
    N/A --- README.md documents new feature/option(s) -- NA

@averydev
Copy link
Contributor Author

averydev commented Apr 7, 2019

I had some trouble getting the generated tests to create the output correctly, which needed a double \\ hence the ugly \\\\ but i didn't want to mess with the test generator extensively.

@bitwiseman bitwiseman added this to the v1.9.x milestone Apr 8, 2019
Copy link
Member

@bitwiseman bitwiseman left a comment

Choose a reason for hiding this comment

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

Perfect. Thanks!

@bitwiseman bitwiseman merged commit 25f56a2 into beautifier:master Apr 8, 2019
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.

None yet

2 participants