leafo / scssphp

SCSS compiler written in PHP
MIT License
1.34k stars 214 forks source link

How output md5 hash (first char is a digit) from value? #631

Closed ange007 closed 5 years ago

ange007 commented 5 years ago

Hello. I tried output $id variables which may begin with a digit (md5). If so, the variable is broken up into several hashes.

Source

.shortcode-#{$id} {
$selector: '.shortcode-' + $id;
#{$selector} {

Result chrome_2019-02-26_17-37-40

How to get rid of it?

robocoder commented 5 years ago

Please see if this is reproducable with v0.7.8 . If so, could you post a more complete example. Thanks.

robocoder commented 5 years ago

Nevermind. I see it's still a problem in Parser.php's unit() method. It's breaking your md5 hash into chunks, treating each chunk as a number followed by a unit.