File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -250,10 +250,11 @@ var actuallyEqualOps = function(wasLower, wasHigher) {
250250
251251
252252var pullRoot = function ( tokens ) {
253- var template = R . repeatN ( '#' , tokens . length || 0 ) . join ( '' ) ;
253+ var template = '' ;
254254 if ( lex . check ( tokens [ 0 ] , { token : 'space' } ) ) {
255255 template = tokens . shift ( ) . repr + template ;
256256 }
257+ template += R . repeatN ( '#' , tokens . length || 0 ) . join ( '' ) ;
257258 return astNode ( 'expr' , tokens , { template : template } ) ;
258259} ;
259260
Original file line number Diff line number Diff line change @@ -323,6 +323,9 @@ describe('Parser', function() {
323323
324324describe ( 'Echo compiler' , function ( ) {
325325 describe ( 'on simple minimal-node ASTs' , function ( ) {
326+ it ( 'should work on just whitespace' , function ( ) {
327+ assert . equal ( compileE ( ' ' ) , ' ' ) ;
328+ } ) ;
326329 it ( 'should work for literals' , function ( ) {
327330 assert . equal ( compileE ( '1' ) , '1' ) ;
328331 } ) ;
You can’t perform that action at this time.
0 commit comments