Skip to content

Commit

Permalink
Added: We are using YAML!
Browse files Browse the repository at this point in the history
  • Loading branch information
YamiOdymel committed Jun 20, 2016
1 parent df98156 commit f77b9ab
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
5. 支援自動編譯 Coffee、Sass。

6. 採用類似 Jade 的標籤,但你仍可以使用 HTML 撰寫。

7. 更簡潔的設定檔!透過 YAML 配置你的模板(且免安裝 YAML 模塊)。

 

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php $maybeHtml = '這是一串文字而且 <a href="#">這是 <b>HTML</b></a>'?><p><?=htmlentities(isset($maybeHtml) ? $maybeHtml : '', \ENT_QUOTES, 'UTF-8')?></p><p><?=isset($maybeHtml) ? $maybeHtml : ''?></p><a<?php $__value = isset($maybeHtml) ? $maybeHtml : false; if (!\Tale\Jade\Compiler\is_null_or_false($__value)) echo ' title='.\Tale\Jade\Compiler\build_value($__value, '"', true); unset($__value);?>></a><a<?php $__value = isset($maybeHtml) ? $maybeHtml : false; if (!\Tale\Jade\Compiler\is_null_or_false($__value)) echo ' title='.\Tale\Jade\Compiler\build_value($__value, '"', false); unset($__value);?>></a><p></p>這會是被轉義的字串: <?=htmlentities(isset($maybeHtml) ? $maybeHtml : '', \ENT_QUOTES, 'UTF-8')?><p></p>這會是 HTML: <?=isset($maybeHtml) ? $maybeHtml : ''?>
<?php $i = 15; ?><p>吻仔魚,吻仔魚。</p><?php $i = 100?><p>更多的吻仔魚。</p><?php $i = ['a','b','c']?><?php $__iterator0 = isset($i) ? $i : [];?><?php foreach ($__iterator0 as $a) {?><p><?=htmlentities(isset($a) ? $a : '', \ENT_QUOTES, 'UTF-8')?></p><?php }?><?php unset($__iterator0);?>
23 changes: 12 additions & 11 deletions test/default/tpls/test.jade
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<?php $i = 15; ?>

p 吻仔魚,吻仔魚。

$maybeHtml= '這是一串文字而且 <a href="#">這是 <b>HTML</b></a>'
- $i = 100

p= $maybeHtml
p!= $maybeHtml
p 更多的吻仔魚。

-
$i = [
'a',
'b',
'c'
]
a(title=$maybeHtml)
a(title!=$maybeHtml)


p
| 這會是被轉義的字串: #{$maybeHtml}
p
| 這會是 HTML: !{$maybeHtml}
each $a in $i
p= $a

0 comments on commit f77b9ab

Please sign in to comment.