diff --git a/.config/ags/modules/.miscutils/md2pango.js b/.config/ags/modules/.miscutils/md2pango.js index e0eb4d4f6..100699939 100644 --- a/.config/ags/modules/.miscutils/md2pango.js +++ b/.config/ags/modules/.miscutils/md2pango.js @@ -49,8 +49,8 @@ const replaceCategory = (text, replaces) => { // Main function export function replaceInlineLatexWithCodeBlocks(text) { - return text.replace(/\\\[(.*?)\\\]|\\\((.*?)\\\)|\$(.*?)\$/gs, (match, square, round, dollar) => { - const latex = square || round || dollar; + return text.replace(/\\\[(.*?)\\\]|\\\((.*?)\\\)/gs, (match, square, round) => { + const latex = square || round; return `\n\`\`\`latex\n${latex}\n\`\`\`\n`; }); }