Browse Source

fixed for $$

develop
Robin Thoni 8 years ago
parent
commit
4c069570f0
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      app/controllers/home.controller.js

+ 4
- 1
app/controllers/home.controller.js View File

@@ -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, "")

Loading…
Cancel
Save