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

Mac电脑上快捷键特性支持之后,同步菜单显示出正确的快捷键指引|支持mermaid 啦 #250

Merged
merged 17 commits into from
Nov 4, 2023

Conversation

bravekingzhang
Copy link
Contributor

@bravekingzhang bravekingzhang commented Nov 3, 2023

  1. 同步CSS编辑器也支持了Mac上的快捷键啦!
  2. 支持显示 mermaid 啦
  3. 菜单上的快捷键指引对不上实际快捷键的问题修复啦

Copy link

github-actions bot commented Nov 3, 2023

🎊 PR Preview has been successfully built and deployed to https://doocs-md-preview-pr-250.surge.sh

@bravekingzhang bravekingzhang changed the title Mac电脑上快捷键特性支持之后,同步菜单限制正确的快捷键指引 Mac电脑上快捷键特性支持之后,同步菜单显示出正确的快捷键指引 Nov 3, 2023
@bravekingzhang bravekingzhang changed the title Mac电脑上快捷键特性支持之后,同步菜单显示出正确的快捷键指引 Mac电脑上快捷键特性支持之后,同步菜单显示出正确的快捷键指引|支持mermaid 啦 Nov 3, 2023
src/assets/scripts/config.js Outdated Show resolved Hide resolved
@yanglbme
Copy link
Member

yanglbme commented Nov 3, 2023

@bravekingzhang 有些问题,编辑的过程中,没有及时更新预览。

image

刷新后才正常显示。

image

@yanglbme
Copy link
Member

yanglbme commented Nov 3, 2023

而且一复制,也还原成编辑模式的了。

image

@bravekingzhang
Copy link
Contributor Author

@yanglbme renderer.code 不能写成异步,还是有点麻烦

@bravekingzhang
Copy link
Contributor Author

@yanglbme 我本地 yarn dev 更本跑不起来,没法调试。

@bravekingzhang
Copy link
Contributor Author

image 全部搞定啦

@@ -123,7 +123,7 @@ class WxRenderer {
renderer.code = (text, lang) => {
if (lang === "katex") {
const html = katex.renderToString(text);
return `<center>${html}</center>`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里不去除似乎也可以。

默认情况下,$$ 的表现就是居中的。

$$ \large x=\sqrt{y}+z^2 $$

@yanglbme
Copy link
Member

yanglbme commented Nov 4, 2023

@bravekingzhang

这里最好不要通过识别 ```katex``` 的方式渲染公式,而是通过匹配 $...$ 符号(行内公式)或者 `$$...$$` 符号(块公式)的方式。

这样更加符合 markdown 语法。

@bravekingzhang
Copy link
Contributor Author

bravekingzhang commented Nov 4, 2023

@bravekingzhang

这里最好不要通过识别 katex 的方式渲染公式,而是通过匹配 $...$ 符号(行内公式)或者 $$...$$ 符号(块公式)的方式。

这样更加符合 markdown 语法。

你引入的marked似乎没暴露 公式这部分的render呀,一期先这样了,能用就行 @yanglbme 【微笑】

@yanglbme
Copy link
Member

yanglbme commented Nov 4, 2023

可以,新加的东西,我先合并,后续可以迭代优化

@yanglbme yanglbme merged commit 192c787 into doocs:main Nov 4, 2023
2 checks passed
@bravekingzhang
Copy link
Contributor Author

可以,新加的东西,我先合并,后续可以迭代优化

  • 老哥加个微信好友吧

@yanglbme
Copy link
Member

yanglbme commented Nov 4, 2023

可以,我微信是 YLB0109

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.

4 participants