File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -413,7 +413,7 @@ def _rst_to_html(rst_text: str) -> str:
413413 "report_level" : 5 ,
414414 "halt_level" : 5 ,
415415 "initial_header_level" : 4 ,
416- "math_output" : "MathJax " ,
416+ "math_output" : "LaTeX " ,
417417 "syntax_highlight" : "short" ,
418418 }
419419 )
Original file line number Diff line number Diff line change 6464 cleaned = ` \\ begin{aligned}${cleaned }\\ end{aligned}` ;
6565 }
6666
67- const isDisplay = el .tagName === ' DIV' || latex .includes (' \\ [' );
67+ const isDisplay = el .tagName === ' DIV' || el . tagName === ' PRE ' || latex .includes (' \\ [' );
6868
6969 const rendered = k .default .renderToString (cleaned , {
7070 displayMode: isDisplay ,
238238 const preElements = container .querySelectorAll (' pre' );
239239
240240 for (const preEl of preElements ) {
241- // Skip if already processed
241+ // Skip if already processed or is math content
242242 if (preEl .classList .contains (' cm-processed' )) continue ;
243+ if (preEl .classList .contains (' math' )) continue ;
243244
244245 // Get code content - either from nested code element or directly from pre
245246 const codeEl = preEl .querySelector (' code' );
You can’t perform that action at this time.
0 commit comments