We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
在代码块/行内代码等部分会对其中内容调用 escapeHtml(tokens[idx].content) 函数的部分,使用中文符号会导致转译出的html代码无法正确应用。
escapeHtml(tokens[idx].content)
例如:原文为
``` int a,b;//定义a,b ```
会变为
<div class="highlight"><pre class="code"><code><span class="hljs-type">int</span> a,b;//定义a<span <span class="hljs-keyword">class</span>="bd-box"><h-<span class="hljs-type">char</span> <span class="hljs-keyword">class</span>="bd bd-beg"><h-<span class="hljs-keyword">inner</span>>,</h-<span class="hljs-keyword">inner</span>></h-<span class="hljs-type">char</span>></span>b </code></pre></div>
目前个人临时的解决办法是将themes\mashiro\scripts\transpunc.js中关于替换content的部分注释掉,然后hexo clean。但是感觉可能还会有更好的方法
themes\mashiro\scripts\transpunc.js
hexo clean
The text was updated successfully, but these errors were encountered:
抱歉,我最近有点忙,一直没有回复。这个地方实现得比较草率,为了标点挤压随便地实现了一下,很多边界条件没考虑到。如果要保持标点挤压,大概就需要重构代码了。
您的处理方法是可以的。也许可以做成主题配置的方式,不需要标点挤压的用户可以通过配置文件关闭这一功能。如果您有兴趣可以做一下,提个PR。
Sorry, something went wrong.
谢谢您的回复,我这边目前也在尝试修复这个功能,不过对hexo的实现还是不太熟,这部分还在摸索之中
No branches or pull requests
在代码块/行内代码等部分会对其中内容调用
escapeHtml(tokens[idx].content)
函数的部分,使用中文符号会导致转译出的html代码无法正确应用。例如:原文为
会变为
目前个人临时的解决办法是将
themes\mashiro\scripts\transpunc.js
中关于替换content的部分注释掉,然后hexo clean
。但是感觉可能还会有更好的方法The text was updated successfully, but these errors were encountered: