git ssb

16+

Dominic / patchbay



Commit e7106661871a2d26bccc7ced98ca979b420058e8

Skip empty lines when computing message title

ex. %4hnehXeMCIB6GI/d/NiLC5QgAVAPeXXqHBoBp+qdkKQ=.sha256
cel committed on 11/28/2016, 8:27:03 PM
Parent: 6c505e91d10a2efe2b0990a27d611c3ff8382007

Files changed

modules_basic/message-name.jschanged
modules_basic/message-name.jsView
@@ -1,10 +1,10 @@
11
22 var sbot_get = require('../plugs').first(exports.sbot_get = [])
33
44 function title (s) {
5- var m = /^[^\n]{0,40}/.exec(s)
6- return m && (m[0].length == 40 ? m[0]+'...' : m[0])
5 + var m = /^\n*([^\n]{0,40})/.exec(s)
6 + return m && (m[1].length == 40 ? m[1]+'...' : m[1])
77 }
88
99 exports.message_name = function (id, cb) {
1010 sbot_get(id, function (err, value) {

Built with git-ssb-web