Fixing newlines in comments.

This commit is contained in:
Samuel Clay 2012-08-09 23:50:49 -07:00
parent c295c578ca
commit f364493214

View file

@ -22,7 +22,7 @@ NEWSBLUR.Views.StoryComment = Backbone.View.extend({
},
render: function() {
this.model.set('comments', this.model.get('comments').replace(/\n+/g, '<br><br>'));
var comments = this.model.get('comments').replace(/\n+/g, '<br><br>');
var reshare_class = this.model.get('source_user_id') ? 'NB-story-comment-reshare' : '';
var has_likes = _.any(this.model.get('liking_users'));
var liked = _.contains(this.model.get('liking_users'), NEWSBLUR.Globals.user_id);
@ -51,7 +51,7 @@ NEWSBLUR.Views.StoryComment = Backbone.View.extend({
$.make('div', { className: 'NB-story-comment-like' })
]))
]),
$.make('div', { className: 'NB-story-comment-content' }, this.model.get('comments')),
$.make('div', { className: 'NB-story-comment-content' }, comments),
this.make_story_share_comment_replies()
]);