git ssb

0+

ev / microbay



forked from Dominic / patchbay

Tree: 07376795ee2a1eb1ec1c2ae45fe872324b1edeea

Files: 07376795ee2a1eb1ec1c2ae45fe872324b1edeea / modules / post.js

576 bytesRaw
1var markdown = require('ssb-markdown')
2var h = require('hyperscript')
3var u = require('../util')
4var ref = require('ssb-ref')
5
6//render a message
7
8var plugs = require('../plugs')
9var message_link = plugs.first(exports.message_link = [])
10var markdown = plugs.first(exports.markdown = [])
11
12exports.message_content = function (data) {
13 if(!data.value.content || !data.value.content.text) return
14
15 var root = data.value.content.root
16 var re = !root ? null : h('span', 're: ', message_link(root))
17
18 return h('div',
19 re,
20 markdown(data.value.content)
21 )
22
23}
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

Built with git-ssb-web