Skip to content

Partials indentation#705

Merged
phillipj merged 2 commits into
janl:masterfrom
yotammadem:partial-indentation-updated
Aug 21, 2019
Merged

Partials indentation#705
phillipj merged 2 commits into
janl:masterfrom
yotammadem:partial-indentation-updated

Conversation

@yotammadem

@yotammadem yotammadem commented Jul 9, 2019

Copy link
Copy Markdown
Contributor

A fix for: #562

@phillipj

phillipj commented Jul 9, 2019 via email

Copy link
Copy Markdown
Collaborator

@LautaroLobo12 LautaroLobo12 left a comment

Copy link
Copy Markdown

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
Copy Markdown
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.

Comment thread mustache.js Outdated
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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