Skip to content

Commit

Permalink
Merge pull request Getbeans#330 from Pross/patch-1
Browse files Browse the repository at this point in the history
Namespace other less classes in lessc.php
  • Loading branch information
christophherr authored Sep 12, 2018
2 parents 0b11de7 + a691c3c commit fc5fd8d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/api/compiler/vendors/lessc.php
Original file line number Diff line number Diff line change
Expand Up @@ -1772,7 +1772,7 @@ protected function get($name, $default=null) {
// inject array of unparsed strings into environment as variables
protected function injectVariables($args) {
$this->pushEnv();
$parser = new lessc_parser($this, __METHOD__);
$parser = new beans_lessc_parser($this, __METHOD__);
foreach ($args as $name => $strValue) {
if ($name{0} != '@') $name = '@'.$name;
$parser->count = 0;
Expand Down Expand Up @@ -1948,7 +1948,7 @@ public function parse($str = null, $initialVariables = null) {
}

protected function makeParser($name) {
$parser = new lessc_parser($this, $name);
$parser = new beans_lessc_parser($this, $name);
$parser->writeComments = $this->preserveComments;

return $parser;
Expand All @@ -1959,11 +1959,11 @@ public function setFormatter($name) {
}

protected function newFormatter() {
$className = "lessc_formatter_lessjs";
$className = "beans_lessc_formatter_lessjs";
if (!empty($this->formatterName)) {
if (!is_string($this->formatterName))
return $this->formatterName;
$className = "lessc_formatter_$this->formatterName";
$className = "beans_lessc_formatter_$this->formatterName";
}

return new $className;
Expand Down Expand Up @@ -2189,7 +2189,7 @@ public static function cexecute($in, $force = false, $less = null) {
/**
* @ignore
*/
class lessc_parser {
class beans_lessc_parser {
static protected $nextBlockId = 0; // used to uniquely identify blocks

static protected $precedence = array(
Expand Down Expand Up @@ -3572,7 +3572,7 @@ protected function removeComments($text) {
/**
* @ignore
*/
class lessc_formatter_classic {
class beans_lessc_formatter_classic {
public $indentChar = " ";

public $break = "\n";
Expand Down Expand Up @@ -3670,7 +3670,7 @@ public function block($block) {
/**
* @ignore
*/
class lessc_formatter_compressed extends lessc_formatter_classic {
class beans_lessc_formatter_compressed extends beans_lessc_formatter_classic {
public $disableSingle = true;
public $open = "{";
public $selectorSeparator = ",";
Expand All @@ -3686,9 +3686,9 @@ public function indentStr($n = 0) {
/**
* @ignore
*/
class lessc_formatter_lessjs extends lessc_formatter_classic {
class beans_lessc_formatter_lessjs extends beans_lessc_formatter_classic {
public $disableSingle = true;
public $breakSelectors = true;
public $assignSeparator = ": ";
public $selectorSeparator = ",";
}
}

0 comments on commit fc5fd8d

Please sign in to comment.