senchalabs / cssbeautify

Reindent and reformat CSS

Home Page:http://www.senchalabs.org/cssbeautify/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This CSS breaks the parser

bitwombat opened this issue · comments

a#googleplus:hover,a#googleplus:active {
  background:transparent url(img/googleplus_a.png) no-repeat
}

/* Fixed layout for home page - don't*/
#home-top {
  height:336px;
  margin-bottom:100px
}

Test at http://www.senchalabs.org/cssbeautify/ and you'll see the CSS below the comments does not get changed. It's the apostrophe in "don't" that's doing it.

I also ran into this issue. The problem is the parser is choking on the fact that there's either a single or double quote within a comment block, without a corresponding closing quote.

The following will not be formatted properly:

/* Testing failure from ' mark */  

p{color:red}

However, this works, with 2 single quotes

/* Testing failure from '' mark */  

p{color:red}