Skip to content

Commit

Permalink
support multiline mathjax
Browse files Browse the repository at this point in the history
  • Loading branch information
huumn committed Feb 21, 2025
1 parent 00d99a6 commit f2cbed6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default memo(function Text ({ rel = UNKNOWN_LINK_REL, imgproxyUrls, child

// we only need mathjax if there's math content between $$ tags
useEffect(() => {
if (/\$\$(.*?)\$\$/g.test(children)) {
if (/\$\$(.|\n)+\$\$/g.test(children)) {
import('rehype-mathjax').then(mod => {
setMathJaxPlugin(() => mod.default)
}).catch(err => {
Expand Down

0 comments on commit f2cbed6

Please sign in to comment.