spullara / spullara/mustache.java
Indentation of partials according to spec
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 2k
- Forks
- 281
- PR merge metrics
- No merged PRs in 30d
Description
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?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the linked Mustache specification testcase with the current rendering behavior, using the issue's template and partial as the reproduction. The work is done when each line of the partial is indented as shown in the specification's expected output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100