@@ -406,7 +406,7 @@ const Parser = function Parser(context, imports, fileInfo, currentIndex) {
406406 }
407407 parserInput . forget ( ) ;
408408
409- return new ( tree . Quoted ) ( str . charAt ( 0 ) , str . substr ( 1 , str . length - 2 ) , isEscaped , index + currentIndex , fileInfo ) ;
409+ return new ( tree . Quoted ) ( str . charAt ( 0 ) , str . slice ( 1 , - 1 ) , isEscaped , index + currentIndex , fileInfo ) ;
410410 } ,
411411
412412 //
@@ -788,7 +788,7 @@ const Parser = function Parser(context, imports, fileInfo, currentIndex) {
788788 if ( js ) {
789789 warn ( 'Inline JavaScript evaluation (backtick expressions) is deprecated and will be removed in Less 5.x. Use Less functions or custom plugins instead.' , index , 'DEPRECATED' , 'js-eval' ) ;
790790 parserInput . forget ( ) ;
791- return new ( tree . JavaScript ) ( js . substr ( 0 , js . length - 1 ) , Boolean ( escape ) , index + currentIndex , fileInfo ) ;
791+ return new ( tree . JavaScript ) ( js . slice ( 0 , - 1 ) , Boolean ( escape ) , index + currentIndex , fileInfo ) ;
792792 }
793793 parserInput . restore ( 'invalid javascript definition' ) ;
794794 }
@@ -1901,7 +1901,7 @@ const Parser = function Parser(context, imports, fileInfo, currentIndex) {
19011901 }
19021902 if ( parserInput . $char ( ')' ) ) {
19031903 if ( p && ! e ) {
1904- nodes . push ( new ( tree . Paren ) ( new ( tree . QueryInParens ) ( p . op , p . lvalue , p . rvalue , rangeP ? rangeP . op : null , rangeP ? rangeP . rvalue : null , p . _index ) ) ) ;
1904+ nodes . push ( new ( tree . Paren ) ( new ( tree . QueryInParens ) ( p . op , p . lvalue , p . rvalue , rangeP ? rangeP . op : null , rangeP ? rangeP . rvalue : null , p . _index ) ) ) ;
19051905 e = p ;
19061906 } else if ( p && e ) {
19071907 nodes . push ( new ( tree . Paren ) ( new ( tree . Declaration ) ( p , e , null , null , parserInput . i + currentIndex , fileInfo , true ) ) ) ;
@@ -1986,12 +1986,12 @@ const Parser = function Parser(context, imports, fileInfo, currentIndex) {
19861986 if ( parserInput . $str ( '@media' ) ) {
19871987 return this . prepareAndGetNestableAtRule ( tree . Media , index , debugInfo , MediaSyntaxOptions ) ;
19881988 }
1989-
1989+
19901990 if ( parserInput . $str ( '@container' ) ) {
19911991 return this . prepareAndGetNestableAtRule ( tree . Container , index , debugInfo , ContainerSyntaxOptions ) ;
19921992 }
19931993 }
1994-
1994+
19951995 parserInput . restore ( ) ;
19961996 } ,
19971997
0 commit comments