diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-11-16 10:55:49 -0500 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-11-16 11:02:06 -0500 |
commit | eade830580a16b2792fa592db3fbe6fc4a12473b (patch) | |
tree | e4719cf60b8d55c356d2f32623fed59a5255f51c /lib/render-msg.js | |
parent | 5a8a31c7e4523ef4de4c20e28443f9ea18961ce4 (diff) | |
download | patchfoo-eade830580a16b2792fa592db3fbe6fc4a12473b.tar.gz patchfoo-eade830580a16b2792fa592db3fbe6fc4a12473b.zip |
Fix handling long titles
%yZznzSZY8SSRf8e0GNlWOdDwRqYkO4CZX4Pinezm9uA=.sha256
Diffstat (limited to 'lib/render-msg.js')
-rw-r--r-- | lib/render-msg.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js index 6e61108..e25d1b7 100644 --- a/lib/render-msg.js +++ b/lib/render-msg.js @@ -401,8 +401,9 @@ RenderMsg.prototype.title1 = function (cb) { else self.app.getAbout(self.msg.key, function (err, about) { if (err) return cb(err) - var name = about.name || about.title || about.description - if (name) return cb(null, name) + var name = about.name || about.title + || (about.description && mdInline(about.description)) + if (name) return cb(null, truncate(name, 72)) self.message(function (err, el) { if (err) return cb(err) cb(null, '%' + title(h('div', el).textContent)) |