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

头条小程序 markdown 渲染 代码块没有渲染 #280

Closed
mkm0094 opened this issue Apr 1, 2021 · 3 comments
Closed

头条小程序 markdown 渲染 代码块没有渲染 #280

mkm0094 opened this issue Apr 1, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@mkm0094
Copy link

mkm0094 commented Apr 1, 2021

使用环境

uniapp 打包
mp-html 2.1

问题描述

markdown在头条小程序里 代码块无法渲染

QQ20210401-133533@2x

其他场景下正常
QQ20210401-133639@2x

复现方式

直接跑头条小程序即可

@jin-yufeng
Copy link
Owner

是不是还用了 highlight 插件?

@mkm0094
Copy link
Author

mkm0094 commented Apr 2, 2021

是不是还用了highlight插件?

已经删除了 还是这样,可能是字节的问题吧,我渲染md文件,和其他小程序都相差很多,我已经放弃了 使用web-view给头条小程序用了

@mkm0094 mkm0094 closed this as completed Apr 2, 2021
@jin-yufeng
Copy link
Owner

我试了一下,uni-app 编译的时候默认给组件设置了 addGlobalClass,头条小程序设置了 addGlobalClass 导致组件内的 rich-text 里标签的 class 无法匹配组件 ttss 中的内容,导致一些样式丢失了
试试这个 demo.zip 是不是正常的

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