Commit 5a9a53d9 by kimth

Match only exact excape keywords, e.g. in but not sin, arcsin

parent e324dbaf
......@@ -341,7 +341,8 @@ class @Problem
replace_escape_keyword = (match) ->
return '"' + match + '"' # Force MathJax plain text
for escape_keyword in escape_keywords
eqn = eqn.replace(escape_keyword, replace_escape_keyword)
escape_keyword_patt = RegExp('\\b'+escape_keyword+'\\b')
eqn = eqn.replace(escape_keyword_patt, replace_escape_keyword)
return eqn
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment