Commit eade830580a16b2792fa592db3fbe6fc4a12473b
Fix handling long titles
%yZznzSZY8SSRf8e0GNlWOdDwRqYkO4CZX4Pinezm9uA=.sha256cel committed on 11/16/2017, 4:02:06 PM
Parent: 5a8a31c7e4523ef4de4c20e28443f9ea18961ce4
Files changed
lib/markdown-inline.js | changed |
lib/render-msg.js | changed |
lib/markdown-inline.js | ||
---|---|---|
@@ -5,14 +5,14 @@ | ||
5 | 5 … | |
6 | 6 … | var inlineRenderer = new marked.Renderer() |
7 | 7 … | |
8 | 8 … | // inline renderer just spits out the text of links and images |
9 | -inlineRenderer.urltransform = function (url) { return false } | |
9 … | +inlineRenderer.urltransform = function (url) { return url } | |
10 | 10 … | inlineRenderer.link = function (href, title, text) { return unquote(shortenIfLink(text)) } |
11 | 11 … | inlineRenderer.image = function (href, title, text) { return unquote(shortenIfLink(text)) } |
12 | 12 … | inlineRenderer.code = function(code, lang, escaped) { return escaped ? unquote(code) : code } |
13 | 13 … | inlineRenderer.blockquote = function(quote) { return unquote(quote) } |
14 | -inlineRenderer.html = function(html) { return false } | |
14 … | +inlineRenderer.html = function(html) { return html } | |
15 | 15 … | inlineRenderer.heading = function(text, level, raw) { return unquote(text)+' ' } |
16 | 16 … | inlineRenderer.hr = function() { return ' --- ' } |
17 | 17 … | inlineRenderer.br = function() { return ' ' } |
18 | 18 … | inlineRenderer.list = function(body, ordered) { return unquote(body) } |
lib/render-msg.js | ||
---|---|---|
@@ -400,10 +400,11 @@ | ||
400 | 400 … | self.bookclubTitle(cb) |
401 | 401 … | else |
402 | 402 … | self.app.getAbout(self.msg.key, function (err, about) { |
403 | 403 … | if (err) return cb(err) |
404 | - var name = about.name || about.title || about.description | |
405 | - if (name) return cb(null, name) | |
404 … | + var name = about.name || about.title | |
405 … | + || (about.description && mdInline(about.description)) | |
406 … | + if (name) return cb(null, truncate(name, 72)) | |
406 | 407 … | self.message(function (err, el) { |
407 | 408 … | if (err) return cb(err) |
408 | 409 … | cb(null, '%' + title(h('div', el).textContent)) |
409 | 410 … | }) |
Built with git-ssb-web