git ssb

16+

cel / patchfoo



Commit eade830580a16b2792fa592db3fbe6fc4a12473b

Fix handling long titles

%yZznzSZY8SSRf8e0GNlWOdDwRqYkO4CZX4Pinezm9uA=.sha256
cel committed on 11/16/2017, 4:02:06 PM
Parent: 5a8a31c7e4523ef4de4c20e28443f9ea18961ce4

Files changed

lib/markdown-inline.jschanged
lib/render-msg.jschanged
lib/markdown-inline.jsView
@@ -5,14 +5,14 @@
55
66 var inlineRenderer = new marked.Renderer()
77
88 // 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 }
1010 inlineRenderer.link = function (href, title, text) { return unquote(shortenIfLink(text)) }
1111 inlineRenderer.image = function (href, title, text) { return unquote(shortenIfLink(text)) }
1212 inlineRenderer.code = function(code, lang, escaped) { return escaped ? unquote(code) : code }
1313 inlineRenderer.blockquote = function(quote) { return unquote(quote) }
14-inlineRenderer.html = function(html) { return false }
14 +inlineRenderer.html = function(html) { return html }
1515 inlineRenderer.heading = function(text, level, raw) { return unquote(text)+' ' }
1616 inlineRenderer.hr = function() { return ' --- ' }
1717 inlineRenderer.br = function() { return ' ' }
1818 inlineRenderer.list = function(body, ordered) { return unquote(body) }
lib/render-msg.jsView
@@ -400,10 +400,11 @@
400400 self.bookclubTitle(cb)
401401 else
402402 self.app.getAbout(self.msg.key, function (err, about) {
403403 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))
406407 self.message(function (err, el) {
407408 if (err) return cb(err)
408409 cb(null, '%' + title(h('div', el).textContent))
409410 })

Built with git-ssb-web