瀏覽代碼

fixed for $$

develop
Robin Thoni 9 年之前
父節點
當前提交
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, "")

Loading…
取消
儲存