pha*_*ace 38 github github-flavored-markdown
我一直在学习github markdown,我有一个关于变量和宏的问题.
是否可以定义变量或宏来防止重复打印文本块?
用例是我有一个表格生成一个大的超链接网格 - 链接如下所示.
http://www.a-big-long-big-big-long-hyperlink/more-long-stuff?id=1234
Run Code Online (Sandbox Code Playgroud)
如果我能做一次类似下面的事情会很好:
$link=http://www.a-big-long-big-big-long-hyperlink/more-long-stuff?id
Run Code Online (Sandbox Code Playgroud)
然后在表中的每个单元格中,我可以说出类似的内容
$link=1234
Run Code Online (Sandbox Code Playgroud)
其他一些细胞
$link=2345
Run Code Online (Sandbox Code Playgroud)
这个想法是这样的:
干杯.
小智 7
您可以使用 Markdown 的一项称为“参考样式链接”的功能。
[link text][id]或者只是[link text]链接文本是唯一的并且仅由字母、数字、空格和标点符号组成。它们不区分大小写。
然后在文档中的某处定义什么id是:
[id]: http://example.com/whatever
请参阅 https://github.com/biserkov/markdown-playground/blob/master/README.md和
https://raw.githubusercontent.com/biserkov/markdown-playground/master/README.md
以下是编写参考链接的几种方法
[I'm an inline-style link](https://www.somewebsite.com)
[I'm an inline-style link with title](https://www.somewebsite.com "somewebsite's Homepage")
[I'm a reference-style link][Arbitrary case-insensitive reference text]
[I'm a relative reference to a repository file](../blob/master/LICENSE)
[You can use numbers for reference-style link definitions][1]
Or leave it empty and use the [link text itself]
Some text to show that the reference links can follow later.
[arbitrary case-insensitive reference text]: https://www.somewebsite.org
[1]: http://somewebsite.org
[link text itself]: http://www.somewebsite.com
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
17380 次 |
| 最近记录: |