Skip to content

Commit

Permalink
remove unused code, more accurate check for css extension
Browse files Browse the repository at this point in the history
  • Loading branch information
oyejorge committed Feb 7, 2014
1 parent 7d1b5ef commit 53dcc9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
9 changes: 0 additions & 9 deletions test/assets/less-1.6.1.js
Original file line number Diff line number Diff line change
Expand Up @@ -5083,8 +5083,6 @@ tree.Ruleset.prototype = {
var rules = [], match,
key = selector.toCSS();

obj('find '+key);

if (key in this._lookups) { return this._lookups[key]; }

this.rulesets().forEach(function (rule) {
Expand Down Expand Up @@ -5522,14 +5520,7 @@ tree.Selector.prototype = {
genCSS: function (env, output) {
var i, element;

if( !env || !env.firstSelector ){
obj('not first selector >>'+this.elements[0].combinator.value+'<<');
}else{
obj('first selector');
}

if ((!env || !env.firstSelector) && this.elements[0].combinator.value === "") {
obj('add space');
output.add(' ', this.currentFileInfo, this.index);
}
if (!this._css) {
Expand Down
7 changes: 6 additions & 1 deletion test/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,12 @@ public function lessJsProvider($dir){

$list = scandir($dir.'/css');
foreach($list as $file){
if( strpos($file,'.css') === false ){

if( $file === '.' || $file === '..' ){
continue;
}
$type = preg_replace('/.*\.([a-z]+)/','\1',$file);
if( $type !== 'css' ){
continue;
}
$pairs[] = array('/less/'.str_replace('.css','.less',$file), '/css/'.$file );
Expand Down

0 comments on commit 53dcc9c

Please sign in to comment.