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

导入 Markdown 时支持图片路径包含空格 #6688

Closed
2 tasks done
Nofood32 opened this issue Nov 23, 2022 · 2 comments
Closed
2 tasks done

导入 Markdown 时支持图片路径包含空格 #6688

Nofood32 opened this issue Nov 23, 2022 · 2 comments
Assignees
Milestone

Comments

@Nofood32
Copy link

该问题是否已经被报告过了? 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

有两种情况会使图片路径失效:

  1. 路径中有空格,则路径会被解析为纯文本
    image

  2. 路径如果用反斜杠分隔,反斜杠会被编码为%5c导致路径错误
    image

不过,直接输入或粘贴源码,反斜杠和空格都是没问题的。

期待的结果 Expected result

文件夹用空格分隔词语还是很常见的,希望D大,V大能修复下。
斜杠和反斜杠,思源现在都是支持的。希望导入时也一样支持。这样就很方便了,不用去关心斜杆朝哪边。

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

No response

版本环境 Version environment

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

日志文件 Log file

更多信息 More information

No response

@88250 88250 changed the title 导入Markdown文档,图片路径解析错误 导入 Markdown 时支持图片路径包含空格 Nov 23, 2022
@88250 88250 self-assigned this Nov 23, 2022
@88250
Copy link
Member

88250 commented Nov 23, 2022

说点题外话。

Markdown 语法规范实际上是明确不支持路径中包含空格的(除非你用下面两个写法):

image

不过直接用空格的人多了,不同程序在实现上也只能做一些兼容。

作为开发者,我个人觉得 Markdown 实际上是非常坑的,特别是作为存储格式时,其根本无法保证可靠的迁移性,或者说,要保证迁移性只能用 CommonMark/GFM 这类有规范且有测试集的事实标准。

可以这么说,Markdown 只适合用来记录较为简单的文本内容,因为其输入语法简洁高效,但是如果用于存储数据的话将来会被程序绑定得死死的,还不如使用私有格式但是开源的程序来得稳妥 :trollface:

@Nofood32
Copy link
Author

谢谢D大科普,如果使用HTML来写的话可能有用户会觉得太硬核(麻烦)了🤣

Markdown的优缺点都是太简洁了。页内引用需要HTML标签来跳转,本来也是用于HTML的,用来撰写网页内容再合适不过。用于存储就简陋了。

在接触笔记软件前,我用的最多的是word。但是不可否认它有着丰富的格式、排版、插入和审阅。还可以跟自己的全家桶联动。缺点是没有 库 的概念文件是独立,不能像双链一样流畅引用。

扯远了。因为巨硬的实力,word的格式是流通最广。即便是大家最常见的格式,用户也很少去在乎 .doc 和 .docx 的区别。只有打开文件发现格式丢失了才会注意到。

Markdown里的标题和行内元素等语法,大家用惯了,应当保留。而存储格式确实没必要拘泥于.md。至少我用过笔记软件,除非严格按照Markdown来写,不然都不能完美导入其他软件。什么评论、块引用、视图表格、还有安装插件实现的,别想了😓

笔记软件没有一家"巨硬“,不然他的格式就是通用格式。就像kingsoft要兼容microsoft一样。

而在此之前,用户最大的慰籍就是开发者不停更 :trollface:

@88250 88250 added this to the 2.5.2 milestone Nov 24, 2022
@88250 88250 closed this as completed Nov 24, 2022
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

2 participants