From fe59bed88524edaec237e36ec13e3a77cf63da08 Mon Sep 17 00:00:00 2001 From: Chris Rooney Date: Tue, 1 Sep 2015 19:49:12 -0430 Subject: [PATCH] Shorten link text with markdown I would like to use just the issue number as link text, and fall back to the name if there is no number. I've tested that the markdown works in trello; while I haven't built the extension locally, the change is simple enough, that I'm mostly fure it's good. cheers --- js/popup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/popup.js b/js/popup.js index 01d64de..c442cf6 100644 --- a/js/popup.js +++ b/js/popup.js @@ -12,7 +12,7 @@ var addCard = function(num, title, bdesc, link) { else { var name = num + " - " + title; } - var desc = link + '\n\n' + bdesc; + var desc = '[' + (num ? num : name) + '](' + link + ')\n\n' + bdesc; Trello.post("cards", { name: name, desc: desc,