Robin Thoni 9 лет назад
Родитель
Сommit
4c069570f0
1 измененных файлов: 4 добавлений и 1 удалений
  1. 4
    1
      app/controllers/home.controller.js

+ 4
- 1
app/controllers/home.controller.js Просмотреть файл

27
 
27
 
28
             $scope.formatText = function(text)
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
                     return "\\(" + $2 + "\\)";
35
                     return "\\(" + $2 + "\\)";
33
                 }).replace(/\\medskip/g, "")
36
                 }).replace(/\\medskip/g, "")

Загрузка…
Отмена
Сохранить