Closed zhangyx1998 closed 2 years ago
I had a similar problem while trying to integrate MathJax with vuepress-next, since the old plugin has not been ported yet. Typically, MathJax is configured with an inline script like this (see documentation):
<script>
MathJax = {
tex: {
inlineMath: [['$', '$'], ['\\(', '\\)']]
},
svg: {
fontCache: 'global'
}
};
</script>
<script type="text/javascript" id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js">
</script>
Just like in your case, the $
symbols seem to act as special insertion marks and were replaced by a bunch of code. The use of $
seems very fragile, perhaps a longer character sequence could be used with less potential for collisions?
I had a similar problem while trying to integrate MathJax with vuepress-next, since the old plugin has not been ported yet. Typically, MathJax is configured with an inline script like this (see documentation):
<script> MathJax = { tex: { inlineMath: [['$', '$'], ['\\(', '\\)']] }, svg: { fontCache: 'global' } }; </script> <script type="text/javascript" id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"> </script>
Just like in your case, the
$
symbols seem to act as special insertion marks and were replaced by a bunch of code. The use of$
seems very fragile, perhaps a longer character sequence could be used with less potential for collisions?
Thank you for the advice!
However, the problem was actually found in markdown contents. The dollar character is part of the document content, and is intended to be directly rendered to display. I could not simply redefine it like what you did in your case, because I would then alter the original meaning of the content.
Seems only appeared in vite:
Try webpack as a workaround before he fix it.
Definitely caused by this :
Bug report
Description
I am creating a vuepress2 website with its default theme. I found that a certain sequence of input (
$&
) will be replaced by comment<!--vuepress-ssr-app-->
which seems to be used internally as a special insertion mark.Steps to reproduce
#Hello word
into README.md, add the following code block into the markdown source file:$"
qout;