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 更新时 IAL 设置错误 #6725

Closed
2 tasks done
Zuoqiu-Yingyi opened this issue Nov 26, 2022 · 0 comments
Closed
2 tasks done

使用 API /api/block/updateBlock 更新时 IAL 设置错误 #6725

Zuoqiu-Yingyi opened this issue Nov 26, 2022 · 0 comments
Assignees
Labels
Milestone

Comments

@Zuoqiu-Yingyi
Copy link
Contributor

Zuoqiu-Yingyi commented Nov 26, 2022

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

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

该问题是否能够在默认主题(daylight/midnight)下重现? Can the issue be reproduced with the default theme (daylight/midnight)?

  • 我能够在默认主题下重现该问题
    I was able to reproduce the issue with the default theme

描述问题 Describe the problem

使用 API /api/block/updateBlock 更新文档块时, 若请求体的 data 字段为如下内容

请求体

# 代码单元格

```python
import time
```
{: id="20221126231947-0000004" custom-jupyter-index="1" custom-jupyter-output="20221126231947-0000005" custom-jupyter-type="code"}
{{{row
---

---
}}}
{: id="20221126231947-0000005" custom-jupyter-index="1" custom-jupyter-code="20221126231947-0000004" custom-jupyter-type="output"}

更新后的文档导出为模板如下所示

文档导出模板

# 代码单元格
{: custom-jupyter-index="1" custom-jupyter-output="20221126231947-0000005" custom-jupyter-type="code" id="20221126231947-0000004"}

```python
import time
```
{: id="20221126232449-1bepkdv"}

{{{row
---
{: id="20221126232449-p86d59u"}

---
{: id="20221126232449-f5ha8zs"}

}}}
{: custom-jupyter-code="20221126231947-0000004" custom-jupyter-index="1" custom-jupyter-type="output" id="20221126231947-0000005"}

可以发现, 为代码块 python 设置的 IAL token {: id="20221126231947-0000004" custom-jupyter-index="1" custom-jupyter-output="20221126231947-0000005" custom-jupyter-type="code"} 却设置到了代码块前的标题块 # 代码单元格, 与预期不符

但是若移除代码块 IAL 的 id 字段({: custom-jupyter-index="1" custom-jupyter-output="20221126231947-0000005" custom-jupyter-type="code"}), 则该 IAL 正常设置到了代码块, 如下所示

请求体

# 代码单元格

```python
import time
```
{: custom-jupyter-index="1" custom-jupyter-output="20221126231947-0000005" custom-jupyter-type="code"}
{{{row
---

---
}}}
{: id="20221126231947-0000005" custom-jupyter-index="1" custom-jupyter-code="20221126231947-0000004" custom-jupyter-type="output"}

文档导出模板

# 代码单元格
{: id="20221126233343-p4rxnj5" updated="20221126233343"}

```python
import time
```
{: custom-jupyter-index="1" custom-jupyter-output="20221126231947-0000005" custom-jupyter-type="code" id="20221126233343-cuplt4n" updated="20221126233343"}

{{{row
---
{: id="20221126233343-y48ju73" updated="20221126233343"}

---
{: updated="20221126233343" id="20221126233343-t49jpcw"}

}}}
{: custom-jupyter-code="20221126231947-0000004" custom-jupyter-index="1" custom-jupyter-type="output" id="20221126231947-0000005" updated="20221126231947"}

期待的结果 Expected result

使用 API /api/block/updateBlock 更新文档块时 IAL 可正常设置

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

No response

版本环境 Version environment

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

日志文件 Log file

无有效信息输出

更多信息 More information

No response

@88250 88250 self-assigned this Nov 27, 2022
@88250 88250 added the Bug label Nov 27, 2022
@88250 88250 added this to the 2.5.2 milestone Nov 27, 2022
@88250 88250 changed the title 使用 API /api/block/updateBlock 更新文档块时 IAL 设置错误 使用 API /api/block/updateBlock 更新时 IAL 设置错误 Nov 27, 2022
@88250 88250 closed this as completed Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants