fix: parse inline latex as a inline element (#2525)

* fix:  parse inline latex as a inline element

* Update web/src/labs/marked/parser/InlineLatex.tsx

---------

Co-authored-by: zty <zty.dev@outlook.com>
Co-authored-by: boojack <stevenlgtm@gmail.com>
pull/2536/head
zty 2 years ago committed by GitHub
parent 4da3c1d5e5
commit 2d34615eac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -12,11 +12,9 @@ const inlineRenderer = (rawStr: string) => {
} else if (matchResult[2]) {
latexCode = matchResult[2];
}
return (
<div className="w-full max-w-full overflow-x-auto">
return <div className="max-w-full overflow-x-auto">
<TeX key={latexCode}>{latexCode}</TeX>
</div>
);
}
return rawStr;
};

Loading…
Cancel
Save