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 = -> loadMathJax = ->
if !MathJax? if !MathJax?
$.ajax { $.ajax {
...@@ -20,6 +11,15 @@ loadMathJax = -> ...@@ -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) -> markdown = ['$filter', '$sanitize', '$sce', '$timeout', ($filter, $sanitize, $sce, $timeout) ->
link: (scope, elem, attr, ctrl) -> link: (scope, elem, attr, ctrl) ->
return unless ctrl? return unless ctrl?
...@@ -283,8 +283,7 @@ markdown = ['$filter', '$sanitize', '$sce', '$timeout', ($filter, $sanitize, $sc ...@@ -283,8 +283,7 @@ markdown = ['$filter', '$sanitize', '$sce', '$timeout', ($filter, $sanitize, $sc
catch catch
# KaTex does not have full math support. In the case that we come across math we # 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. # can't render, we load MathJax and render the Math with MathJax.
math = textToCheck.substring(startMath, endMath) MathJaxFallback = true
scope.MathJaxFallback = true
loadMathJax() loadMathJax()
return textToCheck return textToCheck
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