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

小工具上传文件不一致 #2115

Closed
3 tasks done
MarmaladeCat opened this issue May 25, 2022 · 3 comments · Fixed by #2137
Closed
3 tasks done

小工具上传文件不一致 #2115

MarmaladeCat opened this issue May 25, 2022 · 3 comments · Fixed by #2137
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@MarmaladeCat
Copy link

Checklist

What is version of Halo has the issue?

docker halo:1.5.3

What database are you using?

H2

What is your deployment method?

Docker

Your site address.

No response

What happened?

使用小工具上传markdown文件,再到全部文章中,发现内容不一致,第一个表格的前面部分丢失,文件内容如附件,或者也可以从如下网址https://gitee.com/openeuler-competition/summer2021-101/blob/master/doc/overview.md

overview.md

Relevant log output

No response

Additional information

上传后的样子,可见缺少了前面部分内容

4044435345DAC3B049094B1FF257518B

@MarmaladeCat
Copy link
Author

日志spring.log没有找到相关的日志,故没上传

@ruibaby
Copy link
Member

ruibaby commented May 26, 2022

可以复现,可能与这里有关

Map<String, List<String>> frontMatter = MarkdownUtils.getFrontMatter(markdown);
// remove frontMatter
markdown = MarkdownUtils.removeFrontMatter(markdown);

将表格的语法当做 FrontMatter 给移除了。

/kind bug

@f2c-ci-robot f2c-ci-robot bot added the kind/bug Categorizes issue or PR as related to a bug. label May 26, 2022
@Simple-Stark
Copy link
Contributor

/assign

Simple-Stark added a commit to Simple-Stark/halo that referenced this issue Jun 3, 2022
Simple-Stark added a commit to Simple-Stark/halo that referenced this issue Jun 3, 2022
f2c-ci-robot bot pushed a commit that referenced this issue Jun 7, 2022
* fix #2115

* ci(单元测试): 放开注释@disabled,避免构建失败

* fix(md文件导入): 对匹配到的Front Matter进行二次校验,如果存在制表符则判定为不是Front Matter

Closes #2115
halo-dev-bot pushed a commit to halo-dev-bot/halo that referenced this issue Jun 7, 2022
f2c-ci-robot bot pushed a commit that referenced this issue Jun 7, 2022
* fix #2115

* ci(单元测试): 放开注释@disabled,避免构建失败

* fix(md文件导入): 对匹配到的Front Matter进行二次校验,如果存在制表符则判定为不是Front Matter

Closes #2115

Co-authored-by: Simple <wrh_1125@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants