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

Indentation of partials according to spec #211

Open
dpoetzsch opened this issue Sep 11, 2018 · 0 comments
Open

Indentation of partials according to spec #211

dpoetzsch opened this issue Sep 11, 2018 · 0 comments

Comments

@dpoetzsch
Copy link
Contributor

dpoetzsch commented Sep 11, 2018

Hi,

I noticed that the following testcase of the mustache spec is not rendered correctly (the partial is not indented):

  - name: Standalone Indentation
    desc: Each line of the partial should be indented before rendering.
    data: { content: "<\n->" }
    template: |
      \
       {{>partial}}
      /
    partials:
      partial: |
        |
        {{{content}}}
        |
    expected: |
      \
       |
       <
      ->
       |
      /

The current outcome is:

\
 |
<
->
|

/

I am using mustache templating for markdown templates where whitespace does matter, so this is a real problem for me.

I saw that the readme states Passes all of the mustache specification tests modulo whitespace differences. Is this on purpose or would a PR that tries to fix this difference from the spec be welcome?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant