cherry-markdown icon indicating copy to clipboard operation
cherry-markdown copied to clipboard

语法hook降级策略

Open sunsonliu opened this issue 2 years ago • 0 comments

Clear and concise description of the problem

当某个语法hook出现性能问题或者报错时,会导致编辑器直接无法正常渲染markdown内容

Suggested solution

希望支持一套降级策略:

  • 监控每个语法hook的耗时,当超时时直接终止并跳过该语法
  • 捕获每个语法hook的报错,当有报错时直接跳过该语法
  • 当语法hook被跳过时,需要根据配置(1、抛出异常;2、回调;3、输出到控制台;4、do nothing)来做出相应操作

Additional context

No response

Validations

  • [ ] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Help us

None

sunsonliu avatar Sep 14 '23 06:09 sunsonliu