diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/render.js | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/lib/render.js b/lib/render.js index 7593e41..0d83f75 100644 --- a/lib/render.js +++ b/lib/render.js @@ -592,10 +592,21 @@ Render.prototype.friendsList = function (prefix) { cb(null, h('a', {href: self.toUrl(prefix + id)}, name)) }) }, 8), - pull.map(function (el) { - return [el, ' '] - }), - pull.flatten(), - pull.map(u.toHTML) + function (read) { + var count = 0 + var ended + return function (abort, cb) { + if (ended) return cb(ended) + read(abort, function (end, el) { + if (end === true) { + ended = true + cb(null, '(' + count + ')') + } else { + count++ + cb(end, u.toHTML(el) + ' ') + } + }) + } + } ) } |