ソースを参照

fixed macro replacement

tags/1.0.5
Robin Thoni 8年前
コミット
2c42657b82
1個のファイルの変更1行の追加1行の削除
  1. 1
    1
      app/controllers/home.controller.js

+ 1
- 1
app/controllers/home.controller.js ファイルの表示

@@ -37,7 +37,7 @@ angular.module('app')
37 37
                     .trim();
38 38
                 $scope.macros.forEach(function(macro)
39 39
                 {
40
-                    var regex = macro.latex.match(/[a-zA-Z0-9]$/) != null ? "([^a-zA-Z0-9])" : "";
40
+                    var regex = macro.latex.match(/[a-zA-Z0-9]$/) != null ? "([^a-zA-Z0-9])" : "()";
41 41
                     text = text.replace(new RegExp($scope.escapeRegExp(macro.latex) + regex, "g"), function($1, $2)
42 42
                     {
43 43
                         return macro.html + $2;

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