Skip to content

Commit 6648085

Browse files
committed
Merge branch 'nested-partials', close #89
2 parents 380fcb0 + 43730bb commit 6648085

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

specs/partials.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,20 @@
5555
},
5656
"expected": "X<Y<>>"
5757
},
58+
{
59+
"name": "Nested",
60+
"desc": "The greater-than operator should work from within partials.",
61+
"data": {
62+
"a": "hello",
63+
"b": "world"
64+
},
65+
"template": "{{>outer}}",
66+
"partials": {
67+
"outer": "*{{a}} {{>inner}}*",
68+
"inner": "{{b}}!"
69+
},
70+
"expected": "*hello world!*"
71+
},
5872
{
5973
"name": "Surrounding Whitespace",
6074
"desc": "The greater-than operator should not alter surrounding whitespace.",

specs/partials.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ tests:
4242
partials: { node: '{{content}}<{{#nodes}}{{>node}}{{/nodes}}>' }
4343
expected: 'X<Y<>>'
4444

45+
- name: Nested
46+
desc: The greater-than operator should work from within partials.
47+
data: { a: "hello", b: "world" }
48+
template: '{{>outer}}'
49+
partials: { outer: '*{{a}} {{>inner}}*', inner: '{{b}}!' }
50+
expected: '*hello world!*'
51+
4552
# Whitespace Sensitivity
4653

4754
- name: Surrounding Whitespace

0 commit comments

Comments
 (0)