-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Curly brackets parse error? #5571
Comments
Similar to #5301, |
I also encountered the similar problem. But hexo raised an ERROR related to Nunjucks:
The line caused this error is a MathJax expression which has double curly brackets: s = \int_{t_1}^{t_2} \sqrt{{\Psi'}^2(t) \cdot {\Phi'}^2(t)} \text d t
👆 here which should be rendered like this: When I separate the double curly brackets, everything goes well. s = \int_{t_1}^{t_2} \sqrt{ {\Psi'}^2(t) \cdot {\Phi'}^2(t)} \text d t
👆 here Here comes my stack trace:
|
You should wrap it in a {% raw %} tag |
Check List
hexo version
to check)Expected behavior
Should look like
123
{#}
234
{{x}}
Actual behavior
How to reproduce?
just
hexo init blog cd blog
and edit
source/_posts/hello-world.md
then
Is the problem still there under
Safe mode
?Yes!
Your Node.js & npm version
Your Hexo and Plugin version
Your
package.json
Your site's
_config.yml
(Optional)No response
Others
Changing the second line to
{ #}
would fix the problem. What a weird bug!p.s. I encountered this bug when trying to use mathjax \def and a note block in the same file.
For example:
$\def\sqr#1{#1^2}$ {% note danger %} danger note {% endnote %}
Adding a space between the
{
and#
also works in this scenario.The text was updated successfully, but these errors were encountered: