File tree 2 files changed +34
-2
lines changed
2 files changed +34
-2
lines changed Original file line number Diff line number Diff line change 233
233
} ,
234
234
235
235
format : function ( context , node ) {
236
- return '.w(' + escape ( node [ 1 ] + node [ 2 ] ) + ')' ;
236
+ return '.w(' + escape ( node [ 1 ] ) + ')' ;
237
237
} ,
238
238
239
239
reference : function ( context , node ) {
Original file line number Diff line number Diff line change @@ -1776,7 +1776,39 @@ var coreTests = [
1776
1776
{
1777
1777
name : "whitespace test" ,
1778
1778
tests : [
1779
- {
1779
+ {
1780
+ name : "whitespace on: whitespace-only template" ,
1781
+ source : "\n " ,
1782
+ context : { } ,
1783
+ expected : "\n " ,
1784
+ message : "whitespace on: whitespace-only template is preserved" ,
1785
+ config : { whitespace : true }
1786
+ } ,
1787
+ {
1788
+ name : "whitespace off: whitespace-only template" ,
1789
+ source : "\n " ,
1790
+ context : { } ,
1791
+ expected : "" ,
1792
+ message : "whitespace off: whitespace-only template is removed" ,
1793
+ config : { whitespace : false }
1794
+ } ,
1795
+ {
1796
+ name : "whitespace on: whitespace-only block" ,
1797
+ source : "{<foo}\n{/foo}{+foo/}" ,
1798
+ context : { } ,
1799
+ expected : "\n" ,
1800
+ message : "whitespace on: whitespace-only block is preserved" ,
1801
+ config : { whitespace : true }
1802
+ } ,
1803
+ {
1804
+ name : "whitespace off: whitespace-only block" ,
1805
+ source : "{<foo}\n{/foo}{+foo/}" ,
1806
+ context : { } ,
1807
+ expected : "" ,
1808
+ message : "whitespace off: whitespace-only block is removed" ,
1809
+ config : { whitespace : false }
1810
+ } ,
1811
+ {
1780
1812
name : "whitespace off: multiline text block runs together" ,
1781
1813
source : [ "<p>" ,
1782
1814
" foo bar baz" ,
You can’t perform that action at this time.
0 commit comments