1
1
/*!
2
- * Less - Leaner CSS v3.5.0-beta.5
2
+ * Less - Leaner CSS v3.5.0-beta.6
3
3
* http://lesscss.org
4
4
*
5
5
* Copyright (c) 2009-2018, Alexis Sellier <[email protected] >
@@ -1498,7 +1498,8 @@ AbstractPluginLoader.prototype.evalPlugin = function(contents, context, imports,
1498
1498
try {
1499
1499
loader = new Function ( 'module' , 'require' , 'registerPlugin' , 'functions' , 'tree' , 'less' , 'fileInfo' , contents ) ;
1500
1500
loader ( localModule , this . require ( filename ) , registerPlugin , registry , this . less . tree , this . less , fileInfo ) ;
1501
- } catch ( e ) {
1501
+ }
1502
+ catch ( e ) {
1502
1503
return new LessError ( e , imports , filename ) ;
1503
1504
}
1504
1505
@@ -1512,12 +1513,16 @@ AbstractPluginLoader.prototype.evalPlugin = function(contents, context, imports,
1512
1513
}
1513
1514
1514
1515
if ( pluginObj ) {
1515
- // For 2.x back-compatibility - setOptions() before install()
1516
1516
pluginObj . imports = imports ;
1517
1517
pluginObj . filename = filename ;
1518
- result = this . trySetOptions ( pluginObj , filename , shortname , pluginOptions ) ;
1519
- if ( result ) {
1520
- return result ;
1518
+
1519
+ // For < 3.x (or unspecified minVersion) - setOptions() before install()
1520
+ if ( ! pluginObj . minVersion || this . compareVersion ( '3.0.0' , pluginObj . minVersion ) < 0 ) {
1521
+ result = this . trySetOptions ( pluginObj , filename , shortname , pluginOptions ) ;
1522
+
1523
+ if ( result ) {
1524
+ return result ;
1525
+ }
1521
1526
}
1522
1527
1523
1528
// Run on first load
@@ -4721,7 +4726,7 @@ var Parser = function Parser(context, imports, fileInfo) {
4721
4726
. push ( { variadic : true } ) ;
4722
4727
break ;
4723
4728
}
4724
- arg = entities . variable ( ) || entities . property ( ) || entities . literal ( ) || entities . keyword ( ) ;
4729
+ arg = entities . variable ( ) || entities . property ( ) || entities . literal ( ) || entities . keyword ( ) || this . call ( true ) ;
4725
4730
}
4726
4731
4727
4732
if ( ! arg ) {
@@ -5232,7 +5237,7 @@ var Parser = function Parser(context, imports, fileInfo) {
5232
5237
important = this . important ( ) ;
5233
5238
}
5234
5239
5235
- if ( value && ( hasDR || this . end ( ) ) ) {
5240
+ if ( value && ( this . end ( ) || hasDR ) ) {
5236
5241
parserInput . forget ( ) ;
5237
5242
return new ( tree . Declaration ) ( name , value , important , merge , index , fileInfo ) ;
5238
5243
}
@@ -5413,7 +5418,7 @@ var Parser = function Parser(context, imports, fileInfo) {
5413
5418
var entities = this . entities , nodes = [ ] , e , p ;
5414
5419
parserInput . save ( ) ;
5415
5420
do {
5416
- e = entities . keyword ( ) || entities . variable ( ) ;
5421
+ e = entities . keyword ( ) || entities . variable ( ) || entities . mixinLookup ( ) ;
5417
5422
if ( e ) {
5418
5423
nodes . push ( e ) ;
5419
5424
} else if ( parserInput . $char ( '(' ) ) {
@@ -5447,7 +5452,7 @@ var Parser = function Parser(context, imports, fileInfo) {
5447
5452
features . push ( e ) ;
5448
5453
if ( ! parserInput . $char ( ',' ) ) { break ; }
5449
5454
} else {
5450
- e = entities . variable ( ) ;
5455
+ e = entities . variable ( ) || entities . mixinLookup ( ) ;
5451
5456
if ( e ) {
5452
5457
features . push ( e ) ;
5453
5458
if ( ! parserInput . $char ( ',' ) ) { break ; }
0 commit comments