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 indentation #705

Merged
merged 2 commits into from
Aug 21, 2019
Merged

Partials indentation #705

merged 2 commits into from
Aug 21, 2019

Conversation

yotammadem
Copy link
Contributor

@yotammadem yotammadem commented Jul 9, 2019

A fix for: #562

@phillipj
Copy link
Collaborator

phillipj commented Jul 9, 2019 via email

Copy link

@LautaroLobo12 LautaroLobo12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work dude! We should merge this for sure!

@phillipj
Copy link
Collaborator

Soooo I'm finally back from a long vacation + some general time off the interwebz, sorry for keeping you waiting so long, thanks for your patience.

mustache.js Outdated Show resolved Hide resolved
kevindew and others added 2 commits August 21, 2019 20:59
As referenced in this issue:
#562

Partials aren't indented as per the spec:
https://github.com/mustache/spec/blob/master/specs/partials.yml#L13-L15

This adds indentation tracking for partials and applies them to the
first instance of a partial on a line (to not indent inline partials
which would violate a different part of the spec).
@phillipj
Copy link
Collaborator

Great work and thank you so much for your patience! 👍

FYI with the main intention of cleaning up the commits before landing, I got rid of the merge-with-master commit + latest var nitpick by rebasing with latest changes in master, before force pushing back into your branch.

@phillipj phillipj merged commit 69e2bf3 into janl:master Aug 21, 2019
@yotammadem
Copy link
Contributor Author

Thanks Phillipe for reviewing and merging the solution. Now I will finally be able to use the official mustsche module at my work place. (Until now I used a forked version)

@phillipj
Copy link
Collaborator

v3.0.2 just got published to npm, so enjoy 🚀

phillipj pushed a commit that referenced this pull request Sep 13, 2019
These changes fixes an indentation bug introduced when partials was
made to also be indented like its parent template. When partials are
rendered inline, it should not be indented with the amount of indentation
that the line already has.

Fixes #715
Refs #705
@phillipj phillipj mentioned this pull request Sep 13, 2019
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

Successfully merging this pull request may close these issues.

4 participants