aboutsummaryrefslogtreecommitdiff
path: root/lib/render.js
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-02-01 10:36:08 -0800
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-02-04 02:53:51 -0800
commit5b3dc4bf49f367de33fcd4e6e21281ffec91b6a7 (patch)
tree01e6cadda612c7832ac008e6dff2cf7fe816f59a /lib/render.js
parent4f3840b0b2f765a02d8b90c8cb2e9270458b8ae2 (diff)
downloadpatchfoo-5b3dc4bf49f367de33fcd4e6e21281ffec91b6a7.tar.gz
patchfoo-5b3dc4bf49f367de33fcd4e6e21281ffec91b6a7.zip
Render ferment message types
Diffstat (limited to 'lib/render.js')
-rw-r--r--lib/render.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/render.js b/lib/render.js
index f68c8aa..7af5149 100644
--- a/lib/render.js
+++ b/lib/render.js
@@ -77,6 +77,8 @@ Render.prototype.markdown = function (text, mentions) {
}
Render.prototype.imageUrl = function (ref) {
+ var m = /^blobstore:(.*)/.exec(ref)
+ if (m) ref = m[1]
return this.opts.img_base + ref
}
@@ -93,6 +95,8 @@ Render.prototype.toUrl = function (href) {
case '#': return this.opts.base + encodeURIComponent(href)
case '/': return this.opts.base + href.substr(1)
}
+ var m = /^blobstore:(.*)/.exec(href)
+ if (m) return this.opts.blob_base + m[1]
if (/^javascript:/.test(href)) return false
return href
}