Commit cd5fa8ba authored by RawKStar77's avatar RawKStar77

Move docstring comment next to directive definition

Remove unneeded math variable

Fix typo in forgetting to remove an instance of MathJaxFallback from the scope
parent 52776ec2
###*
# @ngdoc directive
# @name markdown
# @restrict A
# @description
# This directive controls both the rendering and display of markdown, as well as
# the markdown editor.
###
loadMathJax = ->
if !MathJax?
$.ajax {
......@@ -20,6 +11,15 @@ loadMathJax = ->
})
}
###*
# @ngdoc directive
# @name markdown
# @restrict A
# @description
# This directive controls both the rendering and display of markdown, as well as
# the markdown editor.
###
markdown = ['$filter', '$sanitize', '$sce', '$timeout', ($filter, $sanitize, $sce, $timeout) ->
link: (scope, elem, attr, ctrl) ->
return unless ctrl?
......@@ -283,8 +283,7 @@ markdown = ['$filter', '$sanitize', '$sce', '$timeout', ($filter, $sanitize, $sc
catch
# KaTex does not have full math support. In the case that we come across math we
# can't render, we load MathJax and render the Math with MathJax.
math = textToCheck.substring(startMath, endMath)
scope.MathJaxFallback = true
MathJaxFallback = true
loadMathJax()
return textToCheck
textToCheck = (
......
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