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

嵌入块中脚本换行时导出为模板后不能正确解析 #3629

Closed
Zuoqiu-Yingyi opened this issue Dec 19, 2021 · 1 comment
Closed
Assignees
Labels
Milestone

Comments

@Zuoqiu-Yingyi
Copy link
Contributor

Zuoqiu-Yingyi commented Dec 19, 2021

描述问题 Describe the problem

文章中有一个嵌入块中含有如下语句

select
    *
from
    blocks
where
    updated > '2021121900000000'
    and updated < '2021122000000000'
ORDER by
    updated desc
limit
    100

将其导出为模板后的对应内容为

{{select
    *
from
    blocks
where
    updated &gt; 2021121900000000'
    and updated &lt; '2021122000000000'
ORDER by
    updated desc
limit
    100}}
{: id="20211219204448-slc61cq"}

显然该模板因为 SQL 语句换行的问题无法正常解析

期待的结果 Expected result

导出模板时嵌入块的 SQL 语句删除换行, 使得可以正常解析该模板, 如下所示

{{select * from blocks where updated &gt; '2021121900000000' and updated &lt; '2021122000000000' ORDER by updated desc limit 100}}
{: id="20211219204448-slc61cq"}

或者可以正确解析多行 SQL 语句

@Zuoqiu-Yingyi Zuoqiu-Yingyi changed the title 含有多行 SQL 语句的文章导出时未删除换行符 含有多行 SQL 语句的文章导出为模板后不能正确解析 Dec 19, 2021
@Zuoqiu-Yingyi Zuoqiu-Yingyi changed the title 含有多行 SQL 语句的文章导出为模板后不能正确解析 含有嵌入块的文章导出为模板后不能正确解析 Dec 19, 2021
@88250 88250 changed the title 含有嵌入块的文章导出为模板后不能正确解析 嵌入块中脚本换行时导出为模板后不能正确解析 Dec 22, 2021
@88250 88250 self-assigned this Dec 22, 2021
@88250 88250 modified the milestones: backlog, 1.5.5 Dec 22, 2021
@88250 88250 added Bug and removed Enhancement labels Dec 23, 2021
@88250 88250 closed this as completed Dec 23, 2021
@88250
Copy link
Member

88250 commented Dec 23, 2021

换行替换为空格。

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