From 1cf36d6aaacba0cff2c5ecdbaa554e933e345653 Mon Sep 17 00:00:00 2001 From: Julian Gonggrijp Date: Sat, 10 Jul 2021 03:13:55 +0200 Subject: [PATCH 1/3] Add block indentation specs (#130) --- specs/~inheritance.yml | 69 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/specs/~inheritance.yml b/specs/~inheritance.yml index 5a24ba8..d3b3acd 100644 --- a/specs/~inheritance.yml +++ b/specs/~inheritance.yml @@ -235,3 +235,72 @@ tests: partials: parent: "{{#nested}}{{$block}}You say {{fruit}}.{{/block}}{{/nested}}" expected: I say bananas. + + - name: Standalone parent + desc: A parent's opening and closing tags need not be on separate lines in order to be standalone + data: {} + template: | + Hi, + {{ Date: Mon, 12 Jul 2021 15:37:38 +0200 Subject: [PATCH 2/3] Add a spec for nested block reindentation (#130) --- specs/~inheritance.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/specs/~inheritance.yml b/specs/~inheritance.yml index d3b3acd..4ec742a 100644 --- a/specs/~inheritance.yml +++ b/specs/~inheritance.yml @@ -304,3 +304,23 @@ tests: Hi, one two + + - name: Nested block reindentation + desc: Nested blocks are reindented relative to the surrounding block + data: {} + template: | + {{ Date: Tue, 13 Jul 2021 02:38:42 +0200 Subject: [PATCH 3/3] Update the JSON version of the inheritance specs --- specs/~inheritance.json | 56 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/specs/~inheritance.json b/specs/~inheritance.json index 0a6878b..608d55b 100644 --- a/specs/~inheritance.json +++ b/specs/~inheritance.json @@ -245,6 +245,62 @@ "parent": "{{#nested}}{{$block}}You say {{fruit}}.{{/block}}{{/nested}}" }, "expected": "I say bananas." + }, + { + "name": "Standalone parent", + "desc": "A parent's opening and closing tags need not be on separate lines in order to be standalone", + "data": { + }, + "template": "Hi,\n {{