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

Indent Partials #613

Closed
wants to merge 1 commit into from
Closed

Conversation

kevindew
Copy link
Contributor

@kevindew kevindew commented Dec 3, 2016

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).

It's not really a perfect implementation - to really sort this would require reproaching how tokenising is done, so this sort of slots around the current approach to that.

As referenced in this issue:
janl#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).
@brettstack
Copy link

Any update?

@dasilvacontin
Copy link
Collaborator

Nope, all updates are in the respective Issues / PRs. We lack maintainer force. Any help reviewing issues / PRs is appreciated! :)

Copy link

@drazisil drazisil left a comment

Choose a reason for hiding this comment

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

LGTM, and tests pass

@aayalam
Copy link

aayalam commented Apr 12, 2019

Is it possible to receive the indentation string within the called template?

I read the indentation of the first line is part of the specs, but It would be a reasonable solution to merely remove the indentation of the first partial's line and delegating this task to the called template; doing this way, the developer could decide to apply (or not) the indentation as needed.

@phillipj
Copy link
Collaborator

These changes with some additions was merged in #705, therefore closing this PR.

Thanks for your contribution 💯

@phillipj phillipj closed this 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.

None yet

6 participants