Utilisation de > dans mathjax ne fonctionne pas

Fixes #84 Affichage des matrice problématique : ajout de '&' entre les éléments. #71
This commit is contained in:
C. Fuhrman 2024-09-14 11:27:17 -04:00
parent d72dd3ba03
commit bd04a0a07e

View file

@ -16,17 +16,8 @@ function formatLatex(text: string): string {
); );
} }
function escapeHTML(text: string) {
return text
.replace(/&/g, '&')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&#039;');
}
export default function TextType({ text }: TextTypeOptions): string { export default function TextType({ text }: TextTypeOptions): string {
const formatText = formatLatex(escapeHTML(text.text.trim())); const formatText = formatLatex(text.text.trim());
switch (text.format) { switch (text.format) {
case 'moodle': case 'moodle':