Hi,
I'm creating a CSS generator in PHP which uses CSSX (yep, they are my idea) files (with a special syntax). One feature is 'short comments':
body
{
font-family: Georgia; //I really like this font!
}
Now I want to replace this comment with a /* ... */ comment, so the output is like this:
body
{
font-family: Georgia; /*I really like this font!*/
}
How can I do this? Thanks,
P.S. The complete CSSX file is read into one string variable.
P.P.S This q is answered. To fix the url('//server/etc.cssx') problem, use this:
$file = preg_replace('~[^"\'\(]//([^\r\n]*)[^"\'\)]~', '/*$1*/', $file);