Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
0868aefe
Commit
0868aefe
authored
Sep 06, 2012
by
Ibrahim Awwal
Committed by
Matthew Mongeau
Sep 10, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix markdown in thread bodies and comments.
parent
f796c030
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
lms/static/coffee/src/discussion/views/discussion_thread_inline_view.coffee
+1
-1
lms/static/coffee/src/discussion/views/discussion_thread_view.coffee
+1
-1
lms/static/coffee/src/discussion/views/response_comment_view.coffee
+3
-1
No files found.
lms/static/coffee/src/discussion/views/discussion_thread_inline_view.coffee
View file @
0868aefe
...
@@ -54,7 +54,7 @@ class @DiscussionThreadInlineView extends DiscussionContentView
...
@@ -54,7 +54,7 @@ class @DiscussionThreadInlineView extends DiscussionContentView
convertMath
:
->
convertMath
:
->
element
=
@
$
(
".post-body"
)
element
=
@
$
(
".post-body"
)
element
.
html
DiscussionUtil
.
postMathJaxProcessor
(
element
.
html
()
)
element
.
html
DiscussionUtil
.
postMathJaxProcessor
DiscussionUtil
.
markdownWithHighlight
element
.
html
(
)
MathJax
.
Hub
.
Queue
[
"Typeset"
,
MathJax
.
Hub
,
element
[
0
]]
MathJax
.
Hub
.
Queue
[
"Typeset"
,
MathJax
.
Hub
,
element
[
0
]]
renderResponses
:
->
renderResponses
:
->
...
...
lms/static/coffee/src/discussion/views/discussion_thread_view.coffee
View file @
0868aefe
...
@@ -43,7 +43,7 @@ class @DiscussionThreadView extends DiscussionContentView
...
@@ -43,7 +43,7 @@ class @DiscussionThreadView extends DiscussionContentView
convertMath
:
->
convertMath
:
->
element
=
@
$
(
".post-body"
)
element
=
@
$
(
".post-body"
)
element
.
html
DiscussionUtil
.
postMathJaxProcessor
(
element
.
html
()
)
element
.
html
DiscussionUtil
.
postMathJaxProcessor
DiscussionUtil
.
markdownWithHighlight
element
.
html
(
)
MathJax
.
Hub
.
Queue
[
"Typeset"
,
MathJax
.
Hub
,
element
[
0
]]
MathJax
.
Hub
.
Queue
[
"Typeset"
,
MathJax
.
Hub
,
element
[
0
]]
renderResponses
:
->
renderResponses
:
->
...
...
lms/static/coffee/src/discussion/views/response_comment_view.coffee
View file @
0868aefe
...
@@ -2,6 +2,7 @@ class @ResponseCommentView extends DiscussionContentView
...
@@ -2,6 +2,7 @@ class @ResponseCommentView extends DiscussionContentView
tagName
:
"li"
tagName
:
"li"
template
:
_
.
template
(
$
(
"#response-comment-template"
).
html
())
template
:
_
.
template
(
$
(
"#response-comment-template"
).
html
())
initLocal
:
->
initLocal
:
->
# TODO .response-local is the parent of the comments so @$local is null, not sure what was intended here...
@
$local
=
@
$el
.
find
(
".response-local"
)
@
$local
=
@
$el
.
find
(
".response-local"
)
@
$delegateElement
=
@
$local
@
$delegateElement
=
@
$local
...
@@ -14,8 +15,9 @@ class @ResponseCommentView extends DiscussionContentView
...
@@ -14,8 +15,9 @@ class @ResponseCommentView extends DiscussionContentView
@
convertMath
()
@
convertMath
()
@
@
convertMath
:
->
convertMath
:
->
body
=
@
$
(
".response-body"
)
body
=
@
$
el
.
find
(
".response-body"
)
body
.
html
DiscussionUtil
.
postMathJaxProcessor
DiscussionUtil
.
markdownWithHighlight
body
.
html
()
body
.
html
DiscussionUtil
.
postMathJaxProcessor
DiscussionUtil
.
markdownWithHighlight
body
.
html
()
# This removes paragraphs so that comments are more compact
body
.
children
(
"p"
).
each
(
index
,
elem
)
->
body
.
children
(
"p"
).
each
(
index
,
elem
)
->
$
(
elem
).
replaceWith
(
$
(
elem
).
html
())
$
(
elem
).
replaceWith
(
$
(
elem
).
html
())
MathJax
.
Hub
.
Queue
[
"Typeset"
,
MathJax
.
Hub
,
body
[
0
]]
MathJax
.
Hub
.
Queue
[
"Typeset"
,
MathJax
.
Hub
,
body
[
0
]]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment