DanXi icon indicating copy to clipboard operation
DanXi copied to clipboard

[BUG] 当文字下方有一个-时,markdown渲染出现问题

Open ppolariss opened this issue 1 year ago • 2 comments

复现步骤 复现该 Bug 的步骤:

  1. 到 任意编辑 页面
  2. 输入任意文字
  3. 换行,输入一个-
  4. 出现错误

截图 image

系统信息

  • 设备型号:xiaomi13
  • 系统版本:android14
  • 旦挞校园助手版本(见「设置-关于本应用」):1.4.5

ppolariss avatar Dec 26 '24 09:12 ppolariss

我稍微深挖了一下,可以确定原因是 markdown 包中的 UnorderedListSyntax。关闭该扩展样式后,渲染就恢复正常。

我们开启此扩展样式的原因是 MarkdownWidget 默认启用 ExtensionSet.gitHubFlavored 扩展集,其中包含了该样式。

主要问题在于后添加的 UnorderedListSyntax(准确地说,UnorderedListWithCheckboxSyntax)在 HeaderSyntax 之前执行。

w568w avatar Dec 31 '24 06:12 w568w

Upstream issue: https://github.com/dart-lang/tools/issues/2108.

w568w avatar Dec 31 '24 07:12 w568w