Skip to content
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

思源发版CSDN失败 #927

Closed
nangongchengfeng opened this issue Dec 1, 2023 · 4 comments
Closed

思源发版CSDN失败 #927

nangongchengfeng opened this issue Dec 1, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@nangongchengfeng
Copy link

环境版本

系统:win10
思源:win 当前版本 v2.11.0
发布插件:v1.18.10 
操作失败=>ParseError: KaTeX parse error: Expected 'EOF', got '#' at position 386: …m/kubeadm-init/#̲config-file">ht…

image

麻烦您看看是否是我操作有问题

@terwer
Copy link
Owner

terwer commented Dec 3, 2023

看起来是公式解析错误,能否提供一下出错的这篇文章,我排查下。方便的话,可以私发出错的这篇文档到 youweics@163.com

@terwer terwer added the need-reply Wait for reply label Dec 3, 2023
@nangongchengfeng
Copy link
Author

nangongchengfeng commented Dec 3, 2023 via email

@nangongchengfeng
Copy link
Author

看起来是公式解析错误,能否提供一下出错的这篇文章,我排查下。方便的话,可以私发出错的这篇文档到 youweics@163.com

您好,文件已经发送,感谢您的回复和支持

@terwer terwer added bug Something isn't working and removed need-reply Wait for reply labels Dec 3, 2023
@terwer
Copy link
Owner

terwer commented Dec 3, 2023

问题分析:发布工具使用了Cheerio对 CSDN 的 HTML 进行解析, 然后使用 katex渲染公式。但是Cheerio在处理pre节点时可能出现字符截断的问题。这是由于Cheerio默认将HTML进行简化处理的原因。为了避免这个问题,需要改成使用Cheerio的 xmlMode 选项,这样它会更保守地处理HTML。

已修复,请升级 1.18.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants