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

fix: code highlight #780

Merged
merged 1 commit into from
May 31, 2023
Merged

Conversation

fengkx
Copy link
Contributor

@fengkx fengkx commented May 31, 2023

Fixes #778

This is caused by react-syntax-highlighter using refractor v3 wooorm/refractor#59 Prism is a singleton, So It affect all site use Prism

The original repo of react-syntax-highlighter has not been updated for a long time so I publish my own package to fix the problem. react-syntax-highlighter/react-syntax-highlighter#521

@frostming
Copy link
Contributor

frostming commented May 31, 2023

IMO the problem is why it affects the code outside of OpenAI translator when mounted.


Oh, do you mean the extension modified the behavior of Prism singleton and affects the usages of it outside of translator?

@yetone yetone merged commit 766bc57 into openai-translator:main May 31, 2023
3 checks passed
@yetone
Copy link
Collaborator

yetone commented May 31, 2023

LGTM! That's crazy!

@yetone
Copy link
Collaborator

yetone commented May 31, 2023

临时把 OpenAI Translator 从 Chrome Store 下线了,防止用户更新到最新的有问题的版本

@yetone
Copy link
Collaborator

yetone commented Jun 1, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🔥🔥🔥 [Bug] 启用插件导致页面里包含的代码块渲染不正常
3 participants