yogthos/markdown-clj

Feature request: Add support for link (and image) attributes

开放

#134 创建于 2017年4月13日

 (0 条评论) (1 个反应) (0 位负责人)Clojure (120 个派生)github user discovery
enhancementhelp wanted

仓库指标

星标
 (570 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

With issues #116 and #128 going in, we'll have support for titles on links. But there are times when I need to add other attributes such as class, rel and others to links. I know the original markdown syntax doesn't support something like this, but without it, I'm forced to drop down to writing literal HTML for links in most cases. The same is true for images as I want to add the class attribute for them.

I'm proposing the following. It's not my idea, but I like how little it impacts the markdown syntax in terms of aesthetics and readability.

This is a formatted ![penguin_image][] image and a [penguin_link][] link with attributes.

[penguin_image]: http://foo.com/penguin.jpg "penguin" class="img-responsive center-block"
[penguin_link]: http://foo.com/penguin.html "Penguins" rel="external nofollow"
                style="color: red;"

贡献者指南