diff --git a/lib/utils/util.js b/lib/utils/util.js index b3e06c99..de51b19e 100644 --- a/lib/utils/util.js +++ b/lib/utils/util.js @@ -429,7 +429,7 @@ const Util = { return str; }, 'tex': () => { - const texStr = str.replace('%', '\\\\%'); + const texStr = str.replace(/%/g, '\\\\%'); if (status === 'low') { return `$\\color{red}{\\textsf{${texStr}}}$`; }