Pārlūkot izejas kodu

fixed for $$

develop
Robin Thoni 9 gadus atpakaļ
vecāks
revīzija
4c069570f0
1 mainītis faili ar 4 papildinājumiem un 1 dzēšanām
  1. 4
    1
      app/controllers/home.controller.js

+ 4
- 1
app/controllers/home.controller.js Parādīt failu

@@ -27,7 +27,10 @@ angular.module('app')
27 27
 
28 28
             $scope.formatText = function(text)
29 29
             {
30
-                text = text.replace(/\$([^\$]+)\$/g, function($1, $2)
30
+                text = text.replace(/\$\$([^\$]+)\$\$/g, function($1, $2)
31
+                {
32
+                    return "\\(" + $2 + "\\)";
33
+                }).replace(/\$([^\$]+)\$/g, function($1, $2)
31 34
                 {
32 35
                     return "\\(" + $2 + "\\)";
33 36
                 }).replace(/\\medskip/g, "")

Notiek ielāde…
Atcelt
Saglabāt