Skip to content

Commit

Permalink
fix: replace "\neq" in latex
Browse files Browse the repository at this point in the history
  • Loading branch information
PandorasActorMS committed Jan 14, 2025
1 parent c05f68a commit 841a310
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions public/js/syntax_modifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@
//text = text.replace(/\*(.*?)\*/g, '<i>$1</i>'); //clashes with latex
//text = text.replace(/_(.*?)_/g, '<i>$1</i>'); //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, '<del>$1</del>');

Expand Down

0 comments on commit 841a310

Please sign in to comment.