File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -153,10 +153,10 @@ export async function openPopup(
153153
154154 let done = false
155155 const wrapLaTeX = ( latex : string ) => {
156- // HACK: `lines` environment is not supported by KaTeX.
157- // It was replaced by `\ displaylines` in 0.98.5 which is also not supported.
158- if ( latex . startsWith ( '\\begin{lines}' ) ) {
159- latex = latex . replaceAll ( '{lines}' , '{ gather}' )
156+ // HACK: `\displaylines` is not supported by KaTeX.
157+ const matchLines = latex . match ( / ^ \{ \\ d i s p l a y l i n e s (?< content > . * ) \} $ / s )
158+ if ( matchLines !== null && matchLines . groups !== undefined ) {
159+ latex = `\\begin{gather*} ${ matchLines . groups . content } \\end{ gather*}`
160160 }
161161 if ( delim !== '$' && logseq . settings ?. preferMultiline ) {
162162 latex = latex
You can’t perform that action at this time.
0 commit comments