git ssb

16+

Dominic / patchbay



Tree: 1695b03758638d03b6a1920872fefb8315120b24

Files: 1695b03758638d03b6a1920872fefb8315120b24 / 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