Added double section, escaped output, utf8 escaped and utf8 unescaped examples.

This commit is contained in:
Justin Hileman
2010-04-06 00:54:45 -04:00
parent 4baf602eab
commit 1ede993bb3
12 changed files with 40 additions and 0 deletions
@@ -0,0 +1,9 @@
<?php
class DoubleSection extends Mustache {
public function t() {
return true;
}
public $two = "second";
}
@@ -0,0 +1,7 @@
{{#t}}
* first
{{/t}}
* {{two}}
{{#t}}
* third
{{/t}}
@@ -0,0 +1,3 @@
* first
* second
* third
+5
View File
@@ -0,0 +1,5 @@
<?php
class Escaped extends Mustache {
public $title = "Bear > Shark";
}
+1
View File
@@ -0,0 +1 @@
<h1>{{title}}</h1>
+1
View File
@@ -0,0 +1 @@
<h1>Bear &gt; Shark</h1>
+5
View File
@@ -0,0 +1,5 @@
<?php
class UTF8Unescaped extends Mustache {
public $test = '中文又来啦';
}
+1
View File
@@ -0,0 +1 @@
<h1>中文 {{test}}</h1>
+1
View File
@@ -0,0 +1 @@
<h1>中文 中文又来啦</h1>
@@ -0,0 +1,5 @@
<?php
class UTF8 extends Mustache {
public $test = '中文又来啦';
}
@@ -0,0 +1 @@
<h1>中文 {{{test}}}</h1>
@@ -0,0 +1 @@
<h1>中文 中文又来啦</h1>