Skip to content

Commit 9b6fb3a

Browse files
fix: escape % symbol when processing LaTeX equations in remark-img-equations plugin
PR-URL: #5488 Reviewed-by: Athan Reines <[email protected]> Co-authored-by: stdlib-bot <[email protected]>
1 parent 2f0aa48 commit 9b6fb3a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/node_modules/@stdlib/_tools/remark/plugins/remark-img-equations/lib/insert_equations.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ var RAW = /raw="([^"]*)"/;
4646
* @returns {string} substituted equation
4747
*/
4848
function substitute( tex ) {
49+
tex = replace( tex, /%/g, '\\%' );
4950
return replace( tex, /\\operatorname{([^}]*)}/g, '\\mathop{\\mathrm{$1}}' );
5051
}
5152

0 commit comments

Comments
 (0)