Closed asdf2014 closed 5 years ago
Thanks for opening this issue, maintainers will get back to you as soon as possible!
下划线被解释成Markdown语法了。加\
转义,或者修改hexo-renderer-kramed
配置。与NexT无关。
@stevenjoezhang 感谢回复,google 了好久都没有找到如何通过配置 hexo-renderer-kramed 的解决方法~~ 忘告知,万分谢谢!
@asdf2014 您好,可以试一下将_
改为\_
,看看能否解决问题。我没有在使用这个插件,但它可以修改的配置项似乎不多:https://www.npmjs.com/package/hexo-renderer-kramed 。也可以尝试使用其它的渲染插件。
npmMarkdown renderer plugin for Hexo with kramed engine
@stevenjoezhang 是的,没有找到对应的配置文件。我试了一个修改 inline.js
代码的办法,是可以的。具体步骤如下:
# 修改 inline.js 中 inline 变量的 escape 和 em 两个属性
$ vim node_modules/kramed/lib/rules/inline.js
var inline = {
// escape: /^\\([\\`*{}\[\]()#$+\-.!_>])/,
escape: /^\\([`*\[\]()#$+\-.!_>])/,
// em: /^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,
em: /^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,
};
谢谢,未来会把相关内容写进文档,以提示用户避免这个问题。
@stevenjoezhang SGTM :+1:
I agree and want to create new issue
Expected behavior
Actual behavior
Steps to reproduce the behavior
Node.js and NPM Information
Package dependencies Information
Hexo Information
Hexo version
NexT Information
NexT Version:
NexT Scheme:
Other Information
https://yuzhouwan.com/posts/4534/ 这篇里面的 Mathjax 都是正常的,但是 https://yuzhouwan.com/posts/42737/ 中的部分渲染失败了
Mathjax 相关的配置: