fix: output format changed for mathjax script (#417)
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js"],
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [
|
||||
['$', '$'],
|
||||
@@ -35,7 +34,7 @@
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript"
|
||||
src="https://cdn.jsdelivr.net/npm/mathjax@2.7.7/MathJax.js?config=TeX-MML-AM_HTMLorMML">
|
||||
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_SVG">
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
MathJax.Hub.Configured()
|
||||
|
||||
@@ -28,7 +28,7 @@ const baseConfig = {
|
||||
};
|
||||
|
||||
const defaultSanitizeOptions = {
|
||||
USE_PROFILES: { html: true, mathMl: true },
|
||||
USE_PROFILES: { html: true },
|
||||
ADD_ATTR: ['columnalign'],
|
||||
};
|
||||
|
||||
@@ -36,7 +36,7 @@ function HTMLLoader({ htmlNode, componentId, cssClassName }) {
|
||||
const [loadingState, setLoadingState] = useState(window.MathJax ? 'loaded' : 'loading');
|
||||
const sanitizedMath = DOMPurify.sanitize(htmlNode, { ...defaultSanitizeOptions });
|
||||
const previewRef = useRef();
|
||||
const mathjaxScript = 'https://cdn.jsdelivr.net/npm/mathjax@2.7.7/MathJax.js?config=TeX-MML-AM_HTMLorMML';
|
||||
const mathjaxScript = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_SVG';
|
||||
|
||||
useEffect(() => {
|
||||
let mathjaxScriptTag = document.querySelector(`script[src="${mathjaxScript}"]`);
|
||||
|
||||
Reference in New Issue
Block a user