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 export of Markdown hyperlink spaces #9792

Closed
3 tasks done
muhanstudio opened this issue Nov 30, 2023 · 2 comments
Closed
3 tasks done

Improve export of Markdown hyperlink spaces #9792

muhanstudio opened this issue Nov 30, 2023 · 2 comments
Assignees
Milestone

Comments

@muhanstudio
Copy link

muhanstudio commented Nov 30, 2023

思源导出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

在标准markdown格式下,文件链接不允许有空格存在,应该用20%替换空格,但是思源直接导出了带空格
的链接
例如导出以下导出文件链接
可以看到这个链接是无效的:
[你好 你好.pdf](assets/你好 你好-20231020011920-jtmtghf.pdf)

Expected result

应该为以下形式
[你好 你好-20231020011920-jtmtghf](assets/你好%20你好-20231020011920-jtmtghf.pdf)
才是标准的markdown语法
可以看到,以下链接是有效的
你好 你好-20231020011920-jtmtghf

Screenshot or screen recording presentation

No need.

Version environment

- Version: 2.11.0
- Operating System: Windows
- Browser (if used): none

Log file

No need.

More information

No response

@muhanstudio muhanstudio changed the title Please enter the title of the bug report 思源导出markdown链接基本格式的错误 Nov 30, 2023
@muhanstudio
Copy link
Author

此外,思源导出文件貌似会去掉文件名里面的括号,但是却不更改文件链接
例如
文件:811电子技术基础(含模电数电)-20231024002802-hrkua5k.pdf
导出md后文件名变成
811电子技术基础含模电数电-20231024002802-hrkua5k.pdf
但是导出链接依旧为
[811电子技术基础(含模电数电).pdf](assets/811电子技术基础(含模电数电)-20231024002802-hrkua5k.pdf)
而不是
[811电子技术基础(含模电数电).pdf](assets/811电子技术基础含模电数电-20231024002802-hrkua5k.pdf)
同样导致了链接失效,不知道是否是个例?

@88250 88250 self-assigned this Nov 30, 2023
@88250 88250 changed the title 思源导出markdown链接基本格式的错误 Improve export of Markdown hyperlink spaces and markers Nov 30, 2023
@88250 88250 added this to the 2.11.1 milestone Nov 30, 2023
@88250
Copy link
Member

88250 commented Nov 30, 2023

同样导致了链接失效,不知道是否是个例?

正常情况插入的文件会自动剔除 Markdown 标记符(比如 ()),所以导出时是不会存在带标记符的资源文件名的。

@88250 88250 changed the title Improve export of Markdown hyperlink spaces and markers Improve export of Markdown hyperlink spaces Nov 30, 2023
@88250 88250 closed this as completed Nov 30, 2023
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