"src/vscode:/vscode.git/clone" did not exist on "e627b8bf21d2eb5f78f753ed6896ea9255d9e2eb"
Commit ebce0069 authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

refac: latex handling

parent d3c6bfb7
......@@ -178,6 +178,7 @@
{ left: '\\pu{', right: '}', display: false },
{ left: '\\ce{', right: '}', display: false },
{ left: '\\(', right: '\\)', display: false },
{ left: '( ', right: ' )', display: false },
{ left: '\\[', right: '\\]', display: false },
{ left: '[ ', right: ' ]', display: false },
{ left: '\\begin{equation}', right: '\\end{equation}', display: true },
......
......@@ -7,6 +7,9 @@ import { WEBUI_BASE_URL } from '$lib/constants';
//////////////////////////
export const sanitizeResponseContent = (content: string) => {
// replace single backslash with double backslash
content = content.replace(/\\/g, '\\\\');
// First, temporarily replace valid <video> tags with a placeholder
const videoTagRegex = /<video\s+src="([^"]+)"\s+controls><\/video>/gi;
const placeholders: string[] = [];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment