aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/render-msg.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js
index 7911765..c1c388c 100644
--- a/lib/render-msg.js
+++ b/lib/render-msg.js
@@ -211,6 +211,7 @@ RenderMsg.prototype.message = function (cb) {
case 'music-release-cc': return this.musicRelease(cb)
case 'ssb-dns': return this.dns(cb)
case 'gathering': return this.gathering(cb)
+ case 'micro': return this.micro(cb)
case 'ferment/audio':
case 'robeson/audio':
return this.audio(cb)
@@ -780,3 +781,14 @@ RenderMsg.prototype.mutualAccount = function (cb) {
RenderMsg.prototype.gathering = function (cb) {
this.wrapMini('gathering', cb)
}
+
+function unwrapP(html) {
+ return String(html).replace(/^<p>(.*)<\/p>\s*$/, function ($0, $1) {
+ return $1
+ })
+}
+
+RenderMsg.prototype.micro = function (cb) {
+ var el = h('span', {innerHTML: unwrapP(this.markdown())})
+ this.wrapMini(el, cb)
+}