Bar*_*ara 24 syntax markdown hyperlink
可能重复:
如何在Markdown中设置HTML类属性?
在我用普通HTML完成的原始链接中,我有一个类属性,如下所示:
<a href="http://example.com" class="noborder">my link</a>
Run Code Online (Sandbox Code Playgroud)
如何将其翻译为Markdown?我不知道如何上课.
[mylink](http://example.com)
Run Code Online (Sandbox Code Playgroud)
Xav*_*avi 42
布莱恩是对的.标准的Markdown方言不允许您向元素添加类,属性或ID.也就是说,还有其他方言如Maruku通过引入元数据语法来提供这种灵活性.以下是它的几个例子:
## A header with an id ## {: #the-head}
// => <h2 id="the-head">A header with an id</h2>
[a special url](/my-special-place.html){: .special}
// => <a href="/my-special-place.html" class="special">a special url</a>
A paragraph with a random attribute
{: random=attribute}
// => <p random="attribute">A paragraph with a random attribute</p>
Run Code Online (Sandbox Code Playgroud)
有关更多信息,请查看Maruku 元数据提案.
Bri*_*nna 39
您不能将类放入Markdown语法中.在大多数Markdown实现中,您可以嵌入HTML,因此使用原始HTML可能有效.
John Gruber(Markdown的创始人)甚至这样做:
http://daringfireball.net/projects/markdown/syntax.text