jin-yufeng / mp-html

小程序富文本组件,支持渲染和编辑 html,支持在微信、QQ、百度、支付宝、头条和 uni-app 平台使用
https://jin-yufeng.gitee.io/mp-html
MIT License
3.26k stars 477 forks source link

markdown和latex可以一起渲染吗 #576

Closed typing233 closed 7 months ago

typing233 commented 7 months ago

问题描述

在模板区域写:

报错

会提示这个错误:22:36:33.544 LaTeX-incompatible input and strict mode is set to 'warn': Unicode text character "时" used in math mode [unicodeTextInMathMode] at uni_modules/mp-html/components/mp-html/latex/katex.min.js:1 22:36:33.544 LaTeX-incompatible input and strict mode is set to 'warn': Unicode text character "才" used in math mode [unicodeTextInMathMode] at uni_modules/mp-html/components/mp-html/latex/katex.min.js:1 22:36:33.546 LaTeX-incompatible input and strict mode is set to 'warn': Unicode text character "产" used in math mode [unicodeTextInMathMode] at uni_modules/mp-html/components/mp-html/latex/katex.min.js:1 22:36:33.549 LaTeX-incompatible input and strict mode is set to 'warn': Unicode text character "生" used in math mode [unicodeTextInMathMode] at uni_modules/mp-html/components/mp-html/latex/katex.min.js:1 22:36:33.550 LaTeX-incompatible input and strict mode is set to 'warn': Unicode text character "溢" used in math mode [unicodeTextInMathMode] at uni_modules/mp-html/components/mp-html/latex/katex.min.js:1 22:36:33.550 LaTeX-incompatible input and strict mode is set to 'warn': Unicode text character "出" used in math mode [unicodeTextInMathMode] at uni_modules/mp-html/components/mp-html/latex/katex.min.js:1 22:36:33.550 LaTeX-incompatible input and strict mode is set to 'warn': Unicode text character "可" used in math mode [unicodeTextInMathMode] at uni_modules/mp-html/components/mp-html/latex/katex.min.js:1 22:36:33.551 LaTeX-incompatible input and strict mode is set to 'warn': Unicode text character "以" used in math mode [unicodeTextInMathMode] at uni_modules/mp-html/components/mp-html/latex/katex.min.js:1 22:36:33.551 LaTeX-incompatible input and strict mode is set to 'warn': Unicode text character "判" used in math mode [unicodeTextInMathMode] at uni_modules/mp-html/components/mp-html/latex/katex.min.js:1 22:36:33.551 LaTeX-incompatible input and strict mode is set to 'warn': Unicode text character "断" used in math mode [unicodeTextInMathMode] at uni_modules/mp-html/components/mp-html/latex/katex.min.js:1 22:36:33.551 LaTeX-incompatible input and strict mode is set to 'warn': Unicode text character "溢" used in math mode [unicodeTextInMathMode] at uni_modules/mp-html/components/mp-html/latex/katex.min.js:1 22:36:33.552 LaTeX-incompatible input and strict mode is set to 'warn': Unicode text character "出" used in math mode [unicodeTextInMathMode] at uni_modules/mp-html/components/mp-html/latex/katex.min.js:1 22:36:33.552 LaTeX-incompatible input and strict mode is set to 'warn': Unicode text character "标" used in math mode [unicodeTextInMathMode] at uni_modules/mp-html/components/mp-html/latex/katex.min.js:1 22:36:33.552 LaTeX-incompatible input and strict mode is set to 'warn': Unicode text character "志" used in math mode [unicodeTextInMathMode] at uni_modules/mp-html/components/mp-html/latex/katex.min.js:1 22:36:33.552 LaTeX-incompatible input and strict mode is set to 'warn': Unicode text character "为" used in math mode [unicodeTextInMathMode] at uni_modules/mp-html/components/mp-html/latex/katex.min.js:1 22:36:33.552 LaTeX-incompatible input and strict mode is set to 'warn': Unicode text character "。" used in math mode [unicodeTextInMathMode] at uni_modules/mp-html/components/mp-html/latex/katex.min.js:1 22:36:33.552 LaTeX-incompatible input and strict mode is set to 'warn': Unicode text character "同" used in math mode [unicodeTextInMathMode] at uni_modules/mp-html/components/mp-html/latex/katex.min.js:1 22:36:33.552 LaTeX-incompatible input and strict mode is set to 'warn': Unicode text character "时" used in math mode [unicodeTextInMathMode] at uni_modules/mp-html/components/mp-html/latex/katex.min.js:1

修正

如果去掉markdown 就正常了, 所以想知道markdown与latex公式可以一起渲染吗

typing233 commented 7 months ago
jin-yufeng commented 7 months ago

提供可复现的 demo 项目