|
@@ -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;
|