-
Notifications
You must be signed in to change notification settings - Fork 266
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
added template inheritance #186
base: master
Are you sure you want to change the base?
Conversation
Thank you! I'll review it in the weekend and get back to you. |
@@ -1,3 +1,3 @@ | |||
class Mustache | |||
VERSION = '1.0.0' | |||
VERSION = '1.0.1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't change the version number.
I'll bump it previous to releases, it makes it easier to track.
You can ignore the comments apart from the version number one, that one I would appreciate if you could make the change. |
Using What sort of problems were you running into? Was it a regular expression issue? |
Thanks @bobthecow, I actually meant to ask that but seems I forgot. |
Thank you for the review, I am still learning a lot. I startet with ruby only a few weeks ago. I pushed the changes. |
Hi @singy. Like @bobthecow mentioned, it's a problem if this implementation uses a different sigil ( I tried but couldn't figure out what exactly is making the tests not pass if we use |
Also, |
What is the problem with using |
I agree with you, the '$' sign ist the way to go. I changed the source. One test fails, maybe I am wrong and this test is erroneous. https://github.com/singy/mustache/commit/f81e9b1b7c29cadb3c64522785c5de5d3bc8e96e |
@singy well this is confusing. Travis reports 3 errors, I'm getting 4 locally, and you get only 1 xD mine: |
It's order-dependent, varying between 1 and 4 errors. This exposes a problem somewhere in the codebase. |
@@ -298,6 +298,15 @@ def scan_tag_block content, fetch, padding, pre_match_position | |||
end | |||
alias_method :'scan_tag_#', :scan_tag_block | |||
|
|||
def scan_tag_blockvar content, fetch, padding, pre_match_position |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
end | ||
|
||
# load and process parent template | ||
ev(<<-compiled) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Inconsistent indentation detected.
☔ The latest upstream changes (presumably #220) made this pull request unmergeable. Please resolve the merge conflicts. |
For anyone wanting template inheritance/layouts until this patch is accepted, I have implemented it I'm my Ruby Mustache implementation called Tache and am using it in production. |
I added template inheritance as proposed in mustache/spec#38. There where problems using the '$' sign in the parser thats why I chose the '%'. The '$' sign would be a better choice.