Breaking math expressions across newlines fails in Antora, but not asciidoctor
The problem comes when inline stem markup (either asciimath or latexmath) is broken across multiple source lines. See the following screencaps under 'Broken Examples' for antora and asciidoctor respectively:
To create these examples, I forked the simple-examples repo, bumped the asciidoctor-mathjax version to the current 0.8, and created a branch - here's the diff listing: oddhack/simple-examples@main...broken
To build the example, clone https://gitlab.com/oddhack/simple-examples/ and then
git switch broken
cd extensions/mathjax-extension/
npm run clean-build
npm run build-adoc
# Or other preferred browser
chromium build/site/mathjax/1.0/broken-expression.html broken-expression.html
In the first HTML file, generated by Antora, the expressions under the 'Broken Examples' tab are indeed broken - instead of seeing a matrix and a fraction, we see the unprocessed asciimath and latexmath markup.
In the second HTML file, generated by running asciidoctor directly on the same source markup, the expressions under the 'Broken Examples' tab are not broken, and identical to those in the 'Working Examples' tab as desired.
I have not tried diagnosing this further than reproducing the problem, yet. Something about how the extension is capturing the text markup of the expression obviously differs between the two ways of invoking it, but I wanted to check first and see if this is known behavior with some sort of workaround, not being any kind of JS or asciidoctor internals expert.

