Skip to content

Commit

Permalink
Allow text links to show up as linked text
Browse files Browse the repository at this point in the history
This allows the markdown `[desc](http://example.com)` to be rendered in Confluence as `[desc|http://example.com]`.
  • Loading branch information
fidian authored Mar 14, 2017
1 parent 2e01ed1 commit 47d285f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ _.extend(Renderer.prototype, rawRenderer.prototype, {
}
, link: function(href, title, text) {
var arr = [href]
if (title) {
arr.unshift(title)
if (title || text) {
arr.unshift(title || text)
}
return '[' + arr.join('|') + ']'
}
Expand Down

0 comments on commit 47d285f

Please sign in to comment.