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

Improve importing Markdown #13245

Closed
3 tasks done
AdachiQ opened this issue Nov 24, 2024 · 6 comments
Closed
3 tasks done

Improve importing Markdown #13245

AdachiQ opened this issue Nov 24, 2024 · 6 comments
Assignees
Milestone

Comments

@AdachiQ
Copy link

AdachiQ commented Nov 24, 2024

改进markdown文件导入

Is there an existing issue for this?

  • I have searched the existing issues

Can the issue be reproduced with the default theme (daylight/midnight)?

  • I was able to reproduce the issue with the default theme

Could the issue be due to extensions?

  • I've ruled out the possibility that the extension is causing the problem.

Describe the problem

有几个问题需要修复一下,优先级从高到底:

  1. 当yaml中的tags中的某个标签为纯数字时,会导入失败。例如:
---
tags: [思源笔记, 1111]
---

siyuan.log中报错如下:
E 2024/11/24 10:05:31 import.go:671: import from local path failed: PANIC RECOVERED: interface conversion: interface {} is int, not string
2. 当导入markdown文件夹在中间某个文件失败时(例如第1点的情况),已导入的文件没有写入思源,没有写入工作空间文件。这就算了,但是再导入一个没问题的md文件时,上次已导入的部分又会被写入思源。
3. 导入后,hpath不正确,会缺失第一级
image
重建索引后正常
image
4. 对文件名URL解码时应保留+。各个操作系统是允许在文件名中使用+的,解码时应该保留+,而不是解码成空格。

测试文件:
pages.zip

Expected result

  1. 兼容数字标签
  2. 导入失败时,要么就把所有导入数据都丢弃,要么就把已导入成功的部分写入,在下一次导入成功时才把上一次导入一半的数据写入是个什么鬼。
  3. 修复hpath错误
  4. 文件名解码保留+

Screenshot or screen recording presentation

No response

Version environment

- Version: 3.1.13
- Operating System: WIN11
- Browser (if used):

Log file

More information

No response

@88250 88250 self-assigned this Nov 24, 2024
@88250 88250 changed the title 改进markdown文件导入 Improve importing Markdown Nov 24, 2024
@88250 88250 added this to the 3.1.14 milestone Nov 24, 2024
@88250
Copy link
Member

88250 commented Nov 24, 2024

第二点暂时不处理了,感谢反馈。

88250 added a commit that referenced this issue Nov 24, 2024
88250 added a commit that referenced this issue Nov 24, 2024
@88250 88250 closed this as completed Nov 24, 2024
@AdachiQ
Copy link
Author

AdachiQ commented Nov 24, 2024

@88250 又发现个问题,当 同时存在 XX工程.md 和 XX工程 文件夹,且 md文件的yaml区有date或lastmod属性的时候,导入会出问题,同名文件夹会生成一个Untitled文档。而且这个Untitled文档刚开始还不可见,需要点击 文档1中对于 子文档的引用 才会显示。
image
image

pages.zip

@88250
Copy link
Member

88250 commented Nov 25, 2024

稍后改进

88250 added a commit that referenced this issue Nov 25, 2024
@Ffdmx8
Copy link

Ffdmx8 commented Dec 8, 2024

import from local path failed, please check kernel log for details v3.1.14

@Ffdmx8
Copy link

Ffdmx8 commented Dec 8, 2024

导入obsidian时:import from local path failed, please check kernel log for details v3.1.14

@88250
Copy link
Member

88250 commented Dec 8, 2024

@Ffdmx8 请提供 工作空间/temp/siyuan.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants