diff --git a/lessc.inc.php b/lessc.inc.php index 37988952..dcd33295 100644 --- a/lessc.inc.php +++ b/lessc.inc.php @@ -1,5 +1,4 @@ formatter->block($this->scope); $out = ob_get_clean(); setlocale(LC_NUMERIC, $locale); + $out = preg_replace('/___([\w-]+)___/', '[$1]', $out); // Remove CSS named grid protections return $out; } @@ -2449,6 +2449,8 @@ public function __construct($lessc, $sourceName = null) { } public function parse($buffer) { + // lessc->compile() will handle unprotecting CSS named grids. + $buffer = preg_replace('/\[([\w-]+)\]/', '___$1___', $buffer); // Protect CSS named grids $this->count = 0; $this->line = 1;