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

能否显示单一文件? #124

Closed
wodeyoulai opened this issue Jan 18, 2024 · 3 comments
Closed

能否显示单一文件? #124

wodeyoulai opened this issue Jan 18, 2024 · 3 comments

Comments

@wodeyoulai
Copy link

请问大佬。
我有这样一个场景,开始的时候没有对比。所以将old-String设置为空,这样的话会显示+符号和添加的背景颜色,有什么办法可以单纯显示一个文件而去掉+符号和高亮? 等待更新old-String后再加入对比。
再次感谢大佬的辛苦工作!

@Shimada666
Copy link
Owner

我分享下我的做法。在我的场景下,单一展示场景是用的 codemirror。如果预期这个场景的行为就是两种文件的 diff,才使用这个插件

@wodeyoulai
Copy link
Author

ok谢谢大佬,我是觉得我这场景可以做单文件的话,会更简便,优雅一点。大佬有什么建议吗? codemirror和highlight.js ?用highlight的话主题应该和diff更契合一点吧?

@Shimada666
Copy link
Owner

ok谢谢大佬,我是觉得我这场景可以做单文件的话,会更简便,优雅一点。大佬有什么建议吗? codemirror和highlight.js ?用highlight的话主题应该和diff更契合一点吧?

是的,我插件用的也是 github 风格的 highlight.js css。你可以看看

@09473ZH 09473ZH closed this as completed Jan 21, 2024
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

No branches or pull requests

3 participants