diff options
-rw-r--r-- | lib/render-msg.js | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js index a4f2664..92d12e2 100644 --- a/lib/render-msg.js +++ b/lib/render-msg.js @@ -136,7 +136,12 @@ RenderMsg.prototype.wrap = function (content, cb) { ), h('tr', h('td.msg-content', {colspan: 3}, this.issues(done()), - content) + this.c.contentWarning ? [ + h('details', [ + h('summary', 'Content warning: ' + mdInline(this.c.contentWarning)), + content + ]) + ] : content) )]) done(cb) } @@ -159,7 +164,12 @@ RenderMsg.prototype.wrapMini = function (content, cb) { href: this.msg.key ? this.toUrl(this.msg.key) : undefined }, htime(date)), ' '] : '', this.issues(done()), - content), + this.c.contentWarning ? [ + h('details', [ + h('summary', 'Content warning: ' + mdInline(this.c.contentWarning)), + content + ]) + ] : content), h('td.msg-right', this.actions(true)) )) done(cb) |