diff --git a/specs/partials.json b/specs/partials.json index cea9a96..71aa0c8 100644 --- a/specs/partials.json +++ b/specs/partials.json @@ -137,6 +137,18 @@ }, "expected": "\\\n |\n <\n->\n |\n/\n" }, + { + "name": "Per line Indentation", + "desc": "Indentation should only be applied at the start of each line.", + "data": { + "content": "<\n->" + }, + "template": "\\\n {{>partial}}\n/\n", + "partials": { + "partial": "|\n{{{content}}}a b{{{content}}}c\n|\n" + }, + "expected": "\\\n |\n <\n->a b<\n->c\n |\n/\n" + }, { "name": "Padding Whitespace", "desc": "Superfluous in-tag whitespace should be ignored.", diff --git a/specs/partials.yml b/specs/partials.yml index 11b33ee..af7de23 100644 --- a/specs/partials.yml +++ b/specs/partials.yml @@ -106,6 +106,27 @@ tests: | / + - name: Per line Indentation + desc: Indentation should only be applied at the start of each line. + data: { content: "<\n->" } + template: | + \ + {{>partial}} + / + partials: + partial: | + | + {{{content}}}a b{{{content}}}c + | + expected: | + \ + | + < + ->a b< + ->c + | + / + # Whitespace Insensitivity - name: Padding Whitespace