git ssb

3+

dangerousbeans / scuttle-vue



Tree: 8dc25143a3f37f1618f7a92b3c46dec512b43bfd

Files: 8dc25143a3f37f1618f7a92b3c46dec512b43bfd / modules / post.js

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

Built with git-ssb-web