-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fix indentation of inline partials (issue #715) #716
Conversation
Cool, I'll have a look as soon as I -- hopefully before the weekend.
…On Tue, 27 Aug 2019 at 13:26, Yotam Madem ***@***.***> wrote:
------------------------------
You can view, comment on, or merge this pull request online at:
#716
Commit Summary
- a fix fo 715
- change var name
File Changes
- *M* mustache.js
<https://github.com/janl/mustache.js/pull/716/files#diff-0> (17)
- *A* package-lock.json
<https://github.com/janl/mustache.js/pull/716/files#diff-1> (8991)
- *M* test/parse-test.js
<https://github.com/janl/mustache.js/pull/716/files#diff-2> (12)
- *M* test/partial-test.js
<https://github.com/janl/mustache.js/pull/716/files#diff-3> (18)
Patch Links:
- https://github.com/janl/mustache.js/pull/716.patch
- https://github.com/janl/mustache.js/pull/716.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#716?email_source=notifications&email_token=AAJMWEZ3KZVVVKEHXNFD6TLQGUFORA5CNFSM4IQDKB32YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HHT7PLQ>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJMWE2DCC3VZMY23JCKK4DQGUFORANCNFSM4IQDKB3Q>
.
|
Interesting solution indeed! Thinking out loud, my first hope was that we could fix this in a very isolated part of the source code, instead of involving several functions and new kinds of data/tokens being created. E.g. only in the Thanks a lot for your quick response. I'll dive in as well to see if we end up with the same solution or maybe a combination of both. |
I agree. I tired to find the quickest solution that satisfies our requirements. It emphasises the complexity of having too much coupling between the parse function and the indentPartials function like you said. I will try to figure out a better way, now that we have all tests in place, it should be easy to verify the solution. |
Well said! I've also tried looking for different ways to fix it, but couldn't find anything else that introduced less coupling between the different functions & tokens passed. Therefore leaning towards merging this as is and pushing a fix, as that would at least be valuable for end-users, and postponing improvements to reduce coupling for later as that's a more general concern. |
Thanks a lot for finding a fix to this indentation bug! 👍 |
Published in v3.1.0. |
No description provided.