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

&:first-of-type:not(:last-child) when prettified insert erroneous white character #952

Closed
gvocale opened this issue Jun 10, 2016 · 3 comments
Milestone

Comments

@gvocale
Copy link

gvocale commented Jun 10, 2016

When I prettify the following code in Sublime-HTMLPrettify

.div { &:first-of-type:not(:last-child) {} }

the result is:

.div { &:first-of-type:not(: last-child) {} }

Which throws an error in sass, because there is a spacing before "last-child".

I have opened an issue in the Sublime-HTMLPrettify Repo (victorporof/Sublime-HTMLPrettify#310), but they told me to file it here as they use this library.

@gvocale
Copy link
Author

gvocale commented Jun 13, 2016

Just to add to this, when I run HTML/CSS/JS Prettify on the following code, extra white spaces gets added, which throws errors in the console.

Before Prettify:

<feColorMatrix type="matrix" values="0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0" result="gray"></feColorMatrix>

After Prettify:
<feColorMatrix type="matrix " values="0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0 " result="gray "></feColorMatrix>

@vorbe
Copy link

vorbe commented Jun 14, 2016

I get the same sort of thing:
.class {
.class:not(:last-child) {
color:red;
}
}

.class:not(:last-child) {
color:red;
}

The latter is fine, but in the first example, it's the nesting that causes the issue.

@bitwiseman
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants