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

拷贝的时候没有自动生成外链 #52

Open
BianChengNan opened this issue Oct 6, 2019 · 5 comments
Open

拷贝的时候没有自动生成外链 #52

BianChengNan opened this issue Oct 6, 2019 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@BianChengNan
Copy link

运行环境:

操作系统 浏览器
windows Firefox

Markdown文本内容:

例如:

[this is a link][1]
[1]: www.baidu.com

错误详情:

拷贝到微信编辑器的时候没有生成外链。

@BianChengNan BianChengNan added the bug Something isn't working label Oct 6, 2019
@guanpengchn
Copy link
Collaborator

这种语法最开始是支持的,后来改成了[](link "脚注")的语法,主要是考虑兼容性的问题,因为mdnice不仅仅想用在微信处,更想用户编写通用的markdown,而且如果用户不是想放到微信里的,也要给用户选择的机会,比如放到知乎里,这个脚注就没必要了。

后续会考虑提升用户体验,这里的外链生成进行优化。

@BianChengNan
Copy link
Author

@guanpengchn 在微信群里沟通过了。不过我还是觉得有必要保持兼容,因为没坏处啊(可以提供设置选项来开启或者关闭)。
拿我来说,一个链接在博客中会出现多次,用这种语法([description][1])会很方便(复制粘贴的少,而且方便修改,只需要改一处)。不知道其它小伙伴在文章中相同链接出现多次是怎么处理的?

@guanpengchn
Copy link
Collaborator

@BianChengNan 嗯嗯,可以考虑加个配置项,让用户去选择。

其实工具开发之初是希望能够一文多发,所以想做更多的兼容,才会导致这样的设计,[description][1]这种语法在很多平台并不适用,包括目前加入的ruby用法,所以这些稍微特殊一些的用法会考虑之后单独解释一下。

@BianChengNan
Copy link
Author

@guanpengchn 了解了。BTW,你们不会出现一个链接在多处使用的情况吗?你们是怎么解决的?

@houminz
Copy link

houminz commented Oct 6, 2023

@BianChengNan @guanpengchn 我魔改了下官方的 markdown-it-footnote,自己测试现在是可用的 houminz#2

虽然不是很优雅,但是对我来说已经足够了:

  1. 所有的 markdown 文件仍然使用 github 风格的 footnote 1
  2. 微信公众号和知乎通过 mdnice 渲染,其中 footnote 部分使用魔改的官方 markdown-it-footnote plugin
  3. 自己的博客通过类似于 hugo 这样的静态渲染标准 footnote

相关 Issue:

Footnotes

  1. https://github.blog/changelog/2021-09-30-footnotes-now-supported-in-markdown-fields/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants