From 841a310154bdea019c1c74273ea8b2560f629260 Mon Sep 17 00:00:00 2001 From: Mehmet S Date: Tue, 14 Jan 2025 10:29:10 +0000 Subject: [PATCH] fix: replace "\neq" in latex --- public/js/syntax_modifier.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/js/syntax_modifier.js b/public/js/syntax_modifier.js index b9dba15..3160ffa 100644 --- a/public/js/syntax_modifier.js +++ b/public/js/syntax_modifier.js @@ -79,6 +79,12 @@ //text = text.replace(/\*(.*?)\*/g, '$1'); //clashes with latex //text = text.replace(/_(.*?)_/g, '$1'); //clashes with latex + // \neq does not work with font + text = text.replace(/(\\\[.*?\\\])|(\\\(.*?\\\))/gs, (match) => { + return match.replace(/\\neq/g, '\\mathrel{\\char`≠}'); + }); + + // Replace Strikethrough text = text.replace(/~~(.*?)~~/g, '$1');