aboutsummaryrefslogtreecommitdiff
path: root/lib/render.js
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-02-21 11:11:17 -0500
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-02-21 11:11:17 -0500
commitaa81a0cc95f894b695fb2585d8dae18b086b6cfe (patch)
tree07fef7140d900388cfd7589c86e8575d6b2a8706 /lib/render.js
parent0ac4adbe515bf050246e466d65b3c3c77b093d6e (diff)
downloadpatchfoo-aa81a0cc95f894b695fb2585d8dae18b086b6cfe.tar.gz
patchfoo-aa81a0cc95f894b695fb2585d8dae18b086b6cfe.zip
Improve git commit message rendering
- Render as markdown unless it looks like it is plain text - Linkify commit titles - Linkify ssb://% URLs
Diffstat (limited to 'lib/render.js')
-rw-r--r--lib/render.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/render.js b/lib/render.js
index 0cc96c6..573f5d8 100644
--- a/lib/render.js
+++ b/lib/render.js
@@ -100,6 +100,7 @@ Render.prototype.toUrl = function (href) {
if (!href) return href
var mentions = this._mentions
if (mentions && href in this._mentions) href = this._mentions[href]
+ if (/^ssb:\/\//.test(href)) href = href.substr(6)
switch (href[0]) {
case '%': return this.opts.base + encodeURIComponent(href)
case '@':