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

使用 API /api/block/updateBlock 更新块内容时行内元素解析错误 #6470

Closed
1 task done
Zuoqiu-Yingyi opened this issue Nov 3, 2022 · 2 comments
Closed
1 task done

Comments

@Zuoqiu-Yingyi
Copy link
Contributor

该问题是否已经被报告过了? Is there an existing issue for this?

  • 我已经搜索了 Issues,没有发现类似问题
    I have searched the existing issues

描述问题 Describe the problem

问题1

使用 API /api/block/updateBlock 更新块内容时行内元素解析错误
复现方法: markdown 后缀标志前存在空格
出现该问题的行级元素:

  • 加粗
  • 倾斜
  • 删除线
  • 标记
  • 上标
  • 下标
  • 使用行内 IAL 设置样式

复现代码:

**加粗 **
*倾斜 *
~~删除线 ~~
==标记 ==
^上标 ^
~下标 ~
备注^(这是一个行级备注 )^
**颜色 1 **{: style="color: var(--b3-font-color1); background-color: var(--b3-font-background1);"}

渲染样式:
image

问题2

无法使用 API 插入行内备注
数据库 markdown 字段中行内备注为 备注^(这是一个行级备注)^foo^(bar)^
但是使用如下代码插入行内备注则显示为上标样式

备注^(这是一个行级备注)^
foo^(bar)^

image

期待的结果 Expected result

markdown 后缀标志前存在空格的行内元素也能正常渲染(将空格视为行内元素的一部分)
支持使用 API 插入行内备注

截屏或者录屏演示 Screenshot or screen recording presentation

No response

版本环境 Version environment

- Version: 2.4.9
- Operating System: 
- Browser (if used):

日志文件 Log file

无有效信息输出

更多信息 More information

No response

@88250
Copy link
Member

88250 commented Nov 3, 2022

  1. 这个是符合 Markdown 语法的,不解析
  2. 行级备注没有 Markdown 语法支持

@88250 88250 closed this as completed Nov 3, 2022
@Zuoqiu-Yingyi
Copy link
Contributor Author

Zuoqiu-Yingyi commented Nov 3, 2022

  1. 这个是符合 Markdown 语法的,不解析
  2. 行级备注没有 Markdown 语法支持
  1. 那么就是markdown导出与数据库中markdown字段的内容错误:
    输入 foo bar 后划选 foo 并设置为加粗, 导出为 markdown 文档时对应的文本为 **foo **bar, 数据库中对应的字段也为 **foo **bar

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

2 participants