ソースを参照

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

読み込み中…
キャンセル
保存