Skip to content

Commit 2a9c1be

Browse files
committed
Render katex before adding drop zones
Allows drop zones to be inside latex
1 parent 819f1bb commit 2a9c1be

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/app/components/elements/TrustedHtml.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ export const TrustedHtml = ({html, span, className}: {html: string; span?: boole
123123
}
124124
}, []);
125125

126-
const htmlWithClozeDropZones = useClozeDropRegionsInHtml(html);
127-
const katexHtml = useKatex(htmlWithClozeDropZones);
128-
const {htmlWithModifiedTables, tableData} = useAccessibleTables(katexHtml);
126+
const katexHtml = useKatex(html);
127+
const katexHtmlWithClozeDropZones = useClozeDropRegionsInHtml(katexHtml);
128+
const {htmlWithModifiedTables, tableData} = useAccessibleTables(katexHtmlWithClozeDropZones);
129129

130130
const ElementType = span ? "span" : "div";
131131
return <>

0 commit comments

Comments
 (0)