yui/yuicompressor — pull request #181 by nros (2014-12-10 15:22:33+00:00)
Title: fix #180 "preserved tokens" inside comments make the CSS compressor fail.

see issue #180

improvements by these changes:

-) if on of the tokens to be preserved is not followed by a
terminator, the search loop just started over to search from the start
of the css text, finding the terminator of the first token.
This was fixed by breaking out the loop if no terminator can be found.

-) a token is skipped if its position is within an area already copied over
to the resulting string buffer.

-) However, the most important change is: searching for comments is performed
prior to searching for any token to preserve.
This seams reasonable since comments do not contain any CSS
information. They are just - comments.