Просмотр исходного кода

better whitspacing, closes #41

tags/0.3.0
Jan Lehnardt 16 лет назад
Родитель
Сommit
e4ab54d524
14 измененных файлов: 32 добавлений и 31 удалений
  1. +1
    -0
      CHANGES.md
  2. +1
    -1
      examples/array_of_strings.html
  3. +1
    -1
      examples/array_of_strings_options.html
  4. +1
    -1
      examples/array_partial.2.html
  5. +4
    -4
      examples/array_partial.txt
  6. +6
    -6
      examples/complex.html
  7. +5
    -5
      examples/complex.txt
  8. +1
    -1
      examples/partial_recursion.2.html
  9. +1
    -1
      examples/partial_recursion.html
  10. +2
    -2
      examples/recursion_with_same_names.txt
  11. +4
    -4
      examples/reuse_of_enumerables.txt
  12. +1
    -1
      examples/section_as_context.html
  13. +3
    -3
      examples/section_as_context.txt
  14. +1
    -1
      mustache.js

+ 1
- 0
CHANGES.md Просмотреть файл

@@ -2,6 +2,7 @@


## 0.3.0 (??-??-????) ## 0.3.0 (??-??-????)


* Improved whitespace handling.
* Make IMPLICIT ITERATORS a first class feature. * Make IMPLICIT ITERATORS a first class feature.
* Fix Rhino compat. * Fix Rhino compat.
* CommonJS packaging is no longer a special case. * CommonJS packaging is no longer a special case.


+ 1
- 1
examples/array_of_strings.html Просмотреть файл

@@ -1 +1 @@
{{#array_of_strings}} {{.}} {{/array_of_strings}}
{{#array_of_strings}}{{.}} {{/array_of_strings}}

+ 1
- 1
examples/array_of_strings_options.html Просмотреть файл

@@ -1,2 +1,2 @@
{{%IMPLICIT-ITERATOR iterator=rob}} {{%IMPLICIT-ITERATOR iterator=rob}}
{{#array_of_strings_options}} {{rob}} {{/array_of_strings_options}}
{{#array_of_strings_options}}{{rob}} {{/array_of_strings_options}}

+ 1
- 1
examples/array_partial.2.html Просмотреть файл

@@ -1,4 +1,4 @@
Here's a non-sense array of values Here's a non-sense array of values
{{#array}} {{#array}}
{{.}}
{{.}}
{{/array}} {{/array}}

+ 4
- 4
examples/array_partial.txt Просмотреть файл

@@ -1,6 +1,6 @@
Here's a non-sense array of values Here's a non-sense array of values
1
2
3
4
1
2
3
4



+ 6
- 6
examples/complex.html Просмотреть файл

@@ -2,12 +2,12 @@
{{#list}} {{#list}}
<ul> <ul>
{{#item}} {{#item}}
{{#current}}
<li><strong>{{name}}</strong></li>
{{/current}}
{{#link}}
<li><a href="{{url}}">{{name}}</a></li>
{{/link}}
{{#current}}
<li><strong>{{name}}</strong></li>
{{/current}}
{{#link}}
<li><a href="{{url}}">{{name}}</a></li>
{{/link}}
{{/item}} {{/item}}
</ul> </ul>
{{/list}} {{/list}}


+ 5
- 5
examples/complex.txt Просмотреть файл

@@ -1,6 +1,6 @@
<h1>Colors</h1> <h1>Colors</h1>
<ul>
<li><strong>red</strong></li>
<li><a href="#Green">green</a></li>
<li><a href="#Blue">blue</a></li>
</ul>
<ul>
<li><strong>red</strong></li>
<li><a href="#Green">green</a></li>
<li><a href="#Blue">blue</a></li>
</ul>

+ 1
- 1
examples/partial_recursion.2.html Просмотреть файл

@@ -1,4 +1,4 @@
{{name}} {{name}}
{{#children}} {{#children}}
{{>partial}}
{{>partial}}
{{/children}} {{/children}}

+ 1
- 1
examples/partial_recursion.html Просмотреть файл

@@ -1,4 +1,4 @@
{{name}} {{name}}
{{#kids}} {{#kids}}
{{>partial}}
{{>partial}}
{{/kids}} {{/kids}}

+ 2
- 2
examples/recursion_with_same_names.txt Просмотреть файл

@@ -1,6 +1,6 @@
name name
desc desc
t1
t1
0 0
t2
t2
1 1

+ 4
- 4
examples/reuse_of_enumerables.txt Просмотреть файл

@@ -1,8 +1,8 @@
t1
t1
0 0
t2
t2
1 1
t1
t1
0 0
t2
t2
1 1

+ 1
- 1
examples/section_as_context.html Просмотреть файл

@@ -3,7 +3,7 @@
<p>{{description}}</p> <p>{{description}}</p>
<ul> <ul>
{{#a_list}} {{#a_list}}
<li>{{label}}</li>
<li>{{label}}</li>
{{/a_list}} {{/a_list}}
</ul> </ul>
{{/a_object}} {{/a_object}}

+ 3
- 3
examples/section_as_context.txt Просмотреть файл

@@ -1,6 +1,6 @@
<h1>this is an object</h1>
<h1>this is an object</h1>
<p>one of its attributes is a list</p> <p>one of its attributes is a list</p>
<ul> <ul>
<li>listitem1</li>
<li>listitem2</li>
<li>listitem1</li>
<li>listitem2</li>
</ul> </ul>

+ 1
- 1
mustache.js Просмотреть файл

@@ -105,7 +105,7 @@ var Mustache = function() {
var that = this; var that = this;
// CSW - Added "+?" so it finds the tighest bound, not the widest // CSW - Added "+?" so it finds the tighest bound, not the widest
var regex = new RegExp(this.otag + "(\\^|\\#)\\s*(.+)\\s*" + this.ctag + var regex = new RegExp(this.otag + "(\\^|\\#)\\s*(.+)\\s*" + this.ctag +
"\\s*([\\s\\S]+?)" + this.otag + "\\/\\s*\\2\\s*" + this.ctag +
"\n*([\\s\\S]+?)" + this.otag + "\\/\\s*\\2\\s*" + this.ctag +
"\\s*", "mg"); "\\s*", "mg");


// for each {{#foo}}{{/foo}} section do... // for each {{#foo}}{{/foo}} section do...


Загрузка…
Отмена
Сохранить