tbela99 / css

A CSS parser and minifier and sourcemap generator written in PHP
Other
14 stars 1 forks source link

Quotes and extra character #40

Closed Cruglk closed 3 years ago

Cruglk commented 3 years ago

@tbela99, Thanks for the previous fixes! And sorry, but I am writing again with found problems.

2 problems.

Code:

$test = '#test .test2{}#test3 .test4{color:scroll;}';

Result:

#test .test2 {

}
}#test3 .test4 {
 color: scroll
}

An extra character "}" appears after an empty style (no space).

Quotes again (any param in tag):

$test = 'div[data-elem-id="1587819236980"]{background:red;}';

Result:

div[data-elem-id=1587819236980] {
 background: red
}

Correct:

div[data-elem-id="1587819236980"]{
background:red;
}

HTML for test:

<div data-elem-id="1587819236980">
    test
</div>

1 2

tbela99 commented 3 years ago

all issues are fixed

thanks