-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Return value for Handlebars.noConflict(); #959
Conversation
fix global var lookup error when undefined
Unravel mustache loop and hydrate function. Also solidifying / making sense of helpers. Example templates to give you an idea: {{foo}}<span></span> ... function template(context, options) { if (cachedFragment === null) { cachedFragment = build(dom); } var fragment = cachedFragment.cloneNode(true); var helpers = options && options.helpers || {}; var placeholder0 = new Placeholder(fragment,0,1); helpers.CONTENT(placeholder0, "foo", context, [], {escaped:true}, helpers); return fragment; } <span>{{foo}}</span>{{foo}} ... function template(context, options) { if (cachedFragment === null) { cachedFragment = build(dom); } var fragment = cachedFragment.cloneNode(true); var helpers = options && options.helpers || {}; var placeholder0 = new Placeholder(fragment.childNodes[0],-1,-1), placeholder1 = new Placeholder(fragment,0,1); helpers.CONTENT(placeholder0, "foo", context, [], {escaped:true}, helpers); helpers.CONTENT(placeholder1, "foo", context, [], {escaped:true}, helpers); return fragment; } {{foo}}<span>{{bar}}<a>{{baz}}<em>{{boo}}{{brew}}</em>{{bat}}</a></span> <span><span>{{flute}}</span></span>{{argh}} ... function template(context, options) { if (cachedFragment === null) { cachedFragment = build(dom); } var fragment = cachedFragment.cloneNode(true); var helpers = options && options.helpers || {}; var placeholder0 = new Placeholder(fragment,0,1), parent0 = fragment.childNodes[1], placeholder1 = new Placeholder(parent0,-1,0), parent1 = parent0.childNodes[0], placeholder2 = new Placeholder(parent1,-1,0), parent2 = parent1.childNodes[0], placeholder3 = new Placeholder(parent2,-1,0), placeholder4 = new Placeholder(parent2,0,-1), placeholder5 = new Placeholder(parent1,0,-1), placeholder6 = new Placeholder(fragment.childNodes[2].childNodes[0],-1,-1), placeholder7 = new Placeholder(fragment,2,3); helpers.CONTENT(placeholder0, "foo", context, [], {escaped:true}, helpers); helpers.CONTENT(placeholder1, "bar", context, [], {escaped:true}, helpers); helpers.CONTENT(placeholder2, "baz", context, [], {escaped:true}, helpers); helpers.CONTENT(placeholder3, "boo", context, [], {escaped:true}, helpers); helpers.CONTENT(placeholder4, "brew", context, [], {escaped:true}, helpers); helpers.CONTENT(placeholder5, "bat", context, [], {escaped:true}, helpers); helpers.CONTENT(placeholder6, "flute", context, [], {escaped:true}, helpers); helpers.CONTENT(placeholder7, "argh", context, [], {escaped:true}, helpers); return fragment; }
Add passing test for compiling SVG elements
TODO: write tests for this
…present. Need to discuss this with @machty
Fix typo in ARCHITECTURE.md
Fix typo in readme
Conflicts: .gitignore .jshintrc .travis.yml Gruntfile.js LICENSE package.json
I think you selected the wrong branch when creating your pull request. Can you reopen against your own branch? |
This is really embarrassing: I forked your project into my account, then Error message: There isn't anything to compare wycats:master and What am I missing here? On 02/11/2015 06:30 AM, Kevin Decker wrote:
|
General flow that I use when submitting a PR from a fork:
You then make all of the changes that you need, push, and open the the PR. Upstream here is the remote for the source repo, for handlebars you'd need to set that up, something like:
|
As per our discussion #887, it would be great if the noConflict() method returned an instance of Handlebars.
The docs at http://handlebarsjs.com/reference.html (see paragraph Handlebars.noConflict()) already suggests it does.