Commit ebbce32e by Matthew Mongeau

Add highlighting back in

parent 7183991f
......@@ -429,13 +429,13 @@ if Backbone?
display_body: ->
if @has("highlighted_body")
@get("highlighted_body")
String(@get("highlighted_body")).replace(/<highlight>/g, '<mark>').replace(/<\/highlight>/g, '</mark>')
else
@get("body")
display_title: ->
if @has("highlighted_title")
@get("highlighted_title")
String(@get("highlighted_title")).replace(/<highlight>/g, '<mark>').replace(/<\/highlight>/g, '</mark>')
else
@get("title")
......
......@@ -64,9 +64,7 @@ class @DiscussionThreadListView extends Backbone.View
url: url
type: "GET"
success: (response, textStatus) =>
console.log textStatus
if textStatus == 'success'
@collection.reset(response.discussion_data)
console.log(@collection)
@delay(callback, 300)
......@@ -6,6 +6,7 @@ class @DiscussionThreadView extends Backbone.View
template: _.template($("#thread-template").html())
render: ->
console.log(@model)
@$el.html(@template(@model.toJSON()))
@model.bind "change", @updateModelDetails
if window.user.following(@model)
......@@ -24,7 +25,7 @@ class @DiscussionThreadView extends Backbone.View
convertMath: ->
element = @$(".post-body")
element.html DiscussionUtil.postMathJaxProcessor DiscussionUtil.markdownWithHighlight element.html()
element.html DiscussionUtil.postMathJaxProcessor(element.html())
MathJax.Hub.Queue ["Typeset", MathJax.Hub, element.attr("id")]
renderResponses: ->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment