Skip to content

Commit

Permalink
Merge branch 'nested-partials', close #89
Browse files Browse the repository at this point in the history
  • Loading branch information
jgonggrijp committed Jan 26, 2024
2 parents 380fcb0 + 43730bb commit 6648085
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
14 changes: 14 additions & 0 deletions specs/partials.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,20 @@
},
"expected": "X<Y<>>"
},
{
"name": "Nested",
"desc": "The greater-than operator should work from within partials.",
"data": {
"a": "hello",
"b": "world"
},
"template": "{{>outer}}",
"partials": {
"outer": "*{{a}} {{>inner}}*",
"inner": "{{b}}!"
},
"expected": "*hello world!*"
},
{
"name": "Surrounding Whitespace",
"desc": "The greater-than operator should not alter surrounding whitespace.",
Expand Down
7 changes: 7 additions & 0 deletions specs/partials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ tests:
partials: { node: '{{content}}<{{#nodes}}{{>node}}{{/nodes}}>' }
expected: 'X<Y<>>'

- name: Nested
desc: The greater-than operator should work from within partials.
data: { a: "hello", b: "world" }
template: '{{>outer}}'
partials: { outer: '*{{a}} {{>inner}}*', inner: '{{b}}!' }
expected: '*hello world!*'

# Whitespace Sensitivity

- name: Surrounding Whitespace
Expand Down

0 comments on commit 6648085

Please sign in to comment.