Vin*_*rga 13 markdown bitbucket
假设我有一个README.md,我想创建一个指向其名称中包含空格的文件的链接file with spaces.md.我希望能够跳转到文件的源代码.
/
-- README.md
-- File with spaces.md
Run Code Online (Sandbox Code Playgroud)
检查浏览器中的元素后,我弄清楚href应该是什么(手动更改,然后单击它将我带到我想要访问的页面):
<a href="username/repository/src/c0mm1th4sH/File%20with%20%spaces.md">
Run Code Online (Sandbox Code Playgroud)
不幸的是我无法做到这一点.到目前为止我尝试过的一些事情:
[Link](File with spaces.md)
[Link](File%20with%20spaces.md)
[Link](File\ with\ spaces.md)
[Link]("File with spaces.md")
Run Code Online (Sandbox Code Playgroud)
它导致Bitbucket中的以下HTML:
<a href="/username/repository/src/c0mm1th4sH/File%2520with%2520spaces.md">
<a href="/username/repository/src/c0mm1th4sH/File%2520with%2520spaces.md">
<a href="/username/repository/src/c0mm1th4sH/File%5C%2520with%5C%2520spaces.md">
<a href="" title="File with spaces.md">
Run Code Online (Sandbox Code Playgroud)
您可以使用我创建的示例存储库.
Use*_*ser 18
这似乎对我有用:用空间替换空间 .
[Link](File with spaces.md)
Run Code Online (Sandbox Code Playgroud)
Lea*_*ner 10
不同的 Markdown 实现(甚至它们的版本)在处理它们的方式上有所不同。我发现以下内容非常有用(在页面完全加载后单击“预览” - 需要一段时间):
如果链接停止工作,总结......针对许多不同的实现显示了五种不同的可能性:
[1](is not) OK,
[2](is%20not) OK,
[3]("is not") OK,
[4]("is%20not") OK,
[5](is\ not) OK.
Run Code Online (Sandbox Code Playgroud)
似乎所有工作都在某处工作,但 #2 似乎在任何地方(或几乎在任何地方)都有效,并且所有其他选项至少在一种情况下失败。
输出:
标记 0.5.2,MD4C 0.2.7,MD4C(严格)0.2.7,标记 0.15.6.0
[1](不是)OK,2OK,3OK,4OK,[5](不是)OK。
commonmark.js 0.28.1,markdown-it 8.4.2
[1](不是)OK,2OK,3OK,4OK,5OK。
Markdown.pl 1.0.1,Python-Markdown 2.6.5
1 好,2 好,3 好,4 好,5 好。
降价.pl 1.0.2b8
[1](不是)OK,2OK,3OK,4OK,[5](不是)OK。
pandoc(严格)2.5
1 好,2 好,3 好,4 好,5 好。
小气鬼 0.1.0.5,解析 1.6.0
[1](不是)OK,2OK,3OK,4OK,[5](不是)OK。
潘多克 2.5
1 好,2 好,3 好,4 好,5 好。
月球标记 0.4.0
[1](不是)OK,2OK,3OK,4OK,[5](不是)OK。
红地毯 3.3.4
1 好,2 好,3 好,4 好,5 好。
RDiscount 2.1.8
1 好,2 好,3 好,4 好,5 好。
PHP Markdown 1.8.0、PHP Markdown Extra 1.8.0
[1](不是)OK,2OK,3OK,4OK,[5](不是)OK。
Maruku 0.7.3.beta1,Maruku(启用数学)0.7.3.beta1
1ot) OK, 2 OK, 3ot“) OK, 4 OK, 5ot) OK。
MultiMarkdown 5.1.0
[1](不是) OK, 2 OK, [3](“is not”) OK, 4 OK, [5](is\ not) OK。
黑色星期五
1 OK, 2 OK, [3](“不是”) OK, 4 OK, 5 OK。
kramdown 1.2.0,误调 0.8.3
1 好,2 好,3 好,4 好,5 好。
MultiMarkdown 6 6.3.0
1 好,2 好,3 好,4 好,5 好。
s9e\TextFormatter (Fatdown/PHP)
[1](不是) OK, 2 OK, [3](“is not”) OK, 4 OK, [5](is\ not) OK。
cebe/markdown 1.2.0,cebe/markdown GFM 1.2.0,cebe/markdown MarkdownExtra 1.2.0
[1](不是)OK,2OK,3OK,4OK,[5](不是)OK。
甘巴斯 3.8.90
1 好,2 好,好,好,5 好。
摊牌 1.7.4
[1](不是)OK,2OK,3OK,4OK,[5](不是)OK。
摊牌(风味:github)1.7.4
[1](不是)OK,2OK,3OK,4OK,[5](不是)OK。
事实上,Bitbucket 方面存在一个错误,但是该错误现已修复。
假设您的文件被调用File with spaces.md并且您想要显示的文本是Link,这两种方法都可以工作:
* [Link](File with spaces.md)
* [Link](File%20with%20spaces.md)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4683 次 |
| 最近记录: |