Remove unneeded grouping from regular expression (performance improvement)
This commit is contained in:
parent
7b5596fd4a
commit
142857afa2
|
@ -160,7 +160,7 @@ MathJax.Hub.Register.LoadHook("[MathJax]/jax/element/mml/jax.js",function () {
|
|||
if (annotation) {
|
||||
if (nested) {data.unshift(space+" <mrow>"); data.push(space+" </mrow>")}
|
||||
data.unshift(space+" <semantics>");
|
||||
var xmlEscapedTex = jax.originalText.replace(/([&<>])/g, function(item) {
|
||||
var xmlEscapedTex = jax.originalText.replace(/[&<>]/g, function(item) {
|
||||
return { '>': '>', '<': '<','&': '&' }[item]
|
||||
});
|
||||
data.push(space+' <annotation encoding="'+annotation+'">'+xmlEscapedTex+"</annotation>");
|
||||
|
|
Loading…
Reference in New Issue
Block a user