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
Trim input on noel applyTemplate. (Fix #387) #391
Conversation
Guys, when this patch will be merged? Thanks. |
LGTM, I like the fix going to native trim for Node. @tbranyen ? |
@@ -90,7 +90,8 @@ var LayoutManager = Backbone.View.extend({ | |||
if (_.isString(rendered)) { | |||
// If no container is specified, we must replace the content. | |||
if (manager.noel) { | |||
rendered = $.parseHTML(rendered, true); | |||
var trimmed = rendered.trim ? rendered.trim() : $.trim(rendered); |
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.
We could cache the version of trim we want to use:
var trim = String.prototype.trim ?
_.bind(String.prototype.trim.call, String.prototype.trim) :
$.trim;
I moved the trim into |
Trim input on noel applyTemplate. (Fix #387)
Thanks! |
No description provided.