diff --git a/autotests/folding/test.mustache.fold b/autotests/folding/test.mustache.fold index 93d7f3e..41d1723 100644 --- a/autotests/folding/test.mustache.fold +++ b/autotests/folding/test.mustache.fold @@ -1,110 +1,115 @@ html> {{title}} > /* Mustache variable support in CSS is incomplete */ {{mustache}} [ {{other}} ] body { {{{other}}} font-size: 15pt; font-family: Verdana; } > > var foo = {{bar}}; `template {{foo}} ${ var a = {{b}} }` > {{#movie}} >

{{title}}

{{title}}
> > Rating - {{ratings.critics_rating}} > {{/movie}} {{^movie}} > Movie Does Not Exist :( > {{/movie}} {{! this is a comment TODO ALERT }} This is a partial {{> partial1 }} {{#block param=foo param2=bar}} {{block foo=bar}} {{/block}} {{#list people}}{{firstName}} {{lastName}}{{/list}} {{#noop}}{{body}}{{/noop}} {{#with story}} class="intro">{{{intro}}}> class="body">{{{body}}}> {{/with}} {{#each comments}} class="comment">

{{subject}}

{{{body}}}
> {{/each}} {{#list nav}} {{title}} {{/list}} {{!-- Conditionals --}} {{#if isActive}} Active {{else if isInactive}} Inactive {{else}} {{/if}} {{!-- Escaping --}} \{{escaped}} {{{{raw}}}} {{escaped}} {{{{/raw}}}} {{!-- Whitespace Control --}} {{#each nav ~}} {{~#if test}} {{~title}} {{~^~}} Empty {{~/if~}} {{~/each}} {{!-- Helpers --}} {{link "See more..." story.url}} {{log "Look at me!" level="error"}} {{!-- Partial --}} {{> myPartial name=../name }} {{#> myPartial }} Failover content {{/myPartial}} {{#*inline "myPartial"}} My Content {{/inline}} {{#each children}} {{> myPartial}} {{/each}} + + word>word + + word>word + diff --git a/autotests/html/test.mustache.html b/autotests/html/test.mustache.html index 7dba1f1..af51819 100644 --- a/autotests/html/test.mustache.html +++ b/autotests/html/test.mustache.html @@ -1,117 +1,122 @@ test.mustache
 <!-- Mustache / Handlebars / Ractive template -->
 <!DOCTYPE html>
 <html>
     <head>
         <meta charset="UTF-8" />
         <title>{{title}}</title>
     </head>
     <!-- CSS -->
     <style>
         /* Mustache variable support in CSS is incomplete */
         {{mustache}}
         [ {{other}} ]
         body {
             {{{other}}}
             font-size: 15pt;
             font-family: Verdana;
         }
     </style>
     <!-- JavaScript -->
     <script>
         var foo = {{bar}};
         `template {{foo}} ${ var a = {{b}} }`
     </script>
 
     <body>
     {{#movie}}
         <div>
             <h1>{{title}}</h1>
             <img src="{{poster}}" alt="{{title}}"/>
         </div>
         <div>
             Rating - {{ratings.critics_rating}}
         </div>
     {{/movie}}
     {{^movie}}
         <div>
             Movie Does Not Exist :(
         </div>
     {{/movie}}
     {{! this is a comment TODO ALERT }}
 
     This is a partial {{> partial1 }}
     {{#block
         param=foo
         param2=bar}}
         {{block foo=bar}}
     {{/block}}
 
     <!-- Handlebars -->
 
     {{#list people}}{{firstName}} {{lastName}}{{/list}}
     {{#noop}}{{body}}{{/noop}}
     {{#with story}}
         <div class="intro">{{{intro}}}</div>
         <div class="body">{{{body}}}</div>
     {{/with}}
     {{#each comments}}
         <div class="comment">
             <h2>{{subject}}</h2>
             {{{body}}}
         </div>
     {{/each}}
     {{#list nav}}
         <a href="{{url}}">{{title}}</a>
     {{/list}}
 
     {{!-- Conditionals --}}
     {{#if isActive}}
         <img src="star.gif" alt="Active">
     {{else if isInactive}}
         <img src="cry.gif" alt="Inactive">
     {{else}}
         <img src="cry.gif" alt="">
     {{/if}}
 
     {{!-- Escaping --}}
     \{{escaped}}
     {{{{raw}}}}
         {{escaped}}
     {{{{/raw}}}}
 
     {{!-- Whitespace Control --}}
     {{#each nav ~}}
         <a href="{{url}}">
             {{~#if test}}
                 {{~title}}
             {{~^~}}
                 Empty
             {{~/if~}}
         </a>
     {{~/each}}
 
     {{!-- Helpers --}}
     {{link "See more..." story.url}}
     {{log "Look at me!" level="error"}}
 
     {{!-- Partial --}}
     {{> myPartial name=../name }}
     {{#> myPartial }}
         Failover content
     {{/myPartial}}
     {{#*inline "myPartial"}}
         My Content
     {{/inline}}
     {{#each children}}
         {{> myPartial}}
     {{/each}}
 
+    <!-- Delimiters in tags (folding) -->
+    word<div>word
+
+    word</div>word
+
     </body>
 </html>
 
diff --git a/autotests/input/test.mustache b/autotests/input/test.mustache index 7f3f842..755fc56 100644 --- a/autotests/input/test.mustache +++ b/autotests/input/test.mustache @@ -1,110 +1,115 @@ {{title}} {{#movie}}

{{title}}

{{title}}
Rating - {{ratings.critics_rating}}
{{/movie}} {{^movie}}
Movie Does Not Exist :(
{{/movie}} {{! this is a comment TODO ALERT }} This is a partial {{> partial1 }} {{#block param=foo param2=bar}} {{block foo=bar}} {{/block}} {{#list people}}{{firstName}} {{lastName}}{{/list}} {{#noop}}{{body}}{{/noop}} {{#with story}}
{{{intro}}}
{{{body}}}
{{/with}} {{#each comments}}

{{subject}}

{{{body}}}
{{/each}} {{#list nav}} {{title}} {{/list}} {{!-- Conditionals --}} {{#if isActive}} Active {{else if isInactive}} Inactive {{else}} {{/if}} {{!-- Escaping --}} \{{escaped}} {{{{raw}}}} {{escaped}} {{{{/raw}}}} {{!-- Whitespace Control --}} {{#each nav ~}} {{~#if test}} {{~title}} {{~^~}} Empty {{~/if~}} {{~/each}} {{!-- Helpers --}} {{link "See more..." story.url}} {{log "Look at me!" level="error"}} {{!-- Partial --}} {{> myPartial name=../name }} {{#> myPartial }} Failover content {{/myPartial}} {{#*inline "myPartial"}} My Content {{/inline}} {{#each children}} {{> myPartial}} {{/each}} + + word
word + + word
word + diff --git a/autotests/reference/test.mustache.ref b/autotests/reference/test.mustache.ref index bf15709..0697047 100644 --- a/autotests/reference/test.mustache.ref +++ b/autotests/reference/test.mustache.ref @@ -1,110 +1,115 @@
html>


charset="UTF-8" />
</Element Tag><Mustache Variable>{{</Mustache Variable><Mustache Inside>title</Mustache Inside><Mustache Variable>}}</Mustache Variable><Element Tag>







{{#movie}}

{{title}}


src="{{poster}}" alt="{{title}}"/>


Rating - {{ratings.critics_rating}}

{{/movie}}
{{^movie}}

Movie Does Not Exist :(

{{/movie}}
{{! this is a comment TODO ALERT }}

This is a partial {{> partial1 }}
{{#block
param=foo
param2=bar}}
{{block foo=bar}}
{{/block}}



{{#list people}}{{firstName}} {{lastName}}{{/list}}
{{#noop}}{{body}}{{/noop}}
{{#with story}}
class="intro">{{{intro}}}
class="body">{{{body}}}
{{/with}}
{{#each comments}}
class="comment">

{{subject}}


{{{body}}}

{{/each}}
{{#list nav}}
href="{{url}}">{{title}}
{{/list}}

{{!-- Conditionals --}}
{{#if isActive}}
src="star.gif" alt="Active">
{{else if isInactive}}
src="cry.gif" alt="Inactive">
{{else}}
src="cry.gif" alt="">
{{/if}}

{{!-- Escaping --}}
\{{escaped}}
{{{{raw}}}}
{{escaped}}
{{{{/raw}}}}

{{!-- Whitespace Control --}}
{{#each nav ~}}
href="{{url}}">
{{~#if test}}
{{~title}}
{{~^~}}
Empty
{{~/if~}}

{{~/each}}

{{!-- Helpers --}}
{{link "See more..." story.url}}
{{log "Look at me!" level="error"}}

{{!-- Partial --}}
{{> myPartial name=../name }}
{{#> myPartial }}
Failover content
{{/myPartial}}
{{#*inline "myPartial"}}
My Content
{{/inline}}
{{#each children}}
{{> myPartial}}
{{/each}}

+
+ word
word
+
+ word
word
+


diff --git a/data/syntax/mustache.xml b/data/syntax/mustache.xml index c83b350..f82e310 100644 --- a/data/syntax/mustache.xml +++ b/data/syntax/mustache.xml @@ -1,470 +1,471 @@ - - - + + + - + ]> - - + - - + + - + - + - +