Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partials with list sections do not inherit indentation #72

Open
tvandinther opened this issue Dec 5, 2022 · 0 comments
Open

Partials with list sections do not inherit indentation #72

tvandinther opened this issue Dec 5, 2022 · 0 comments
Labels

Comments

@tvandinther
Copy link

stache version: stache-2.3.3@sha256:277a4d71f3612a72f314275c7ff3c872637de2b0e2ac7c9eca5bd83ee7aeea2f,4487
from this stackage nightly
GHC version: 9.2.4


Issue: Rendering an indented partial containing a list section indents only the first iteration of the list section correctly. Subsequent iterations do not have the first line indented.

Example:

Main template:

Subnets:
  {{> myPartial}}

Partial:

{{#subnets}}
- {{ . }}
"Test string"
{{/subnets}}

Rendered output:

Subnets:
  - subnet-0a0a0a0a
  "Test string"
- subnet-0b0b0b0b
  "Test string"
- subnet-0c0c0c0c
  "Test string"

The spec mentions that partials should inherit indentation here: https://github.com/mustache/spec/blob/master/specs/partials.yml#L13-L15

It appears that the spec is trying to be honoured, but there is a bug for the first line of subsequent iterations.

@mrkkrp mrkkrp added the bug label Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants