git ssb

16+

cel / patchfoo



Commit 92f0421665adb2185d90062cf58393742112c5bb

Handle feed id in npm author

cel committed on 6/18/2017, 6:20:16 PM
Parent: a420cffdfbe0457bb07b9aff2778745929295f88

Files changed

lib/render.jschanged
lib/render.jsView
@@ -351,14 +351,19 @@
351351 if (!author) return
352352 var url = u.ifString(author.url)
353353 var email = u.ifString(author.email)
354354 var name = u.ifString(author.name)
355 + var title
356 + if (!url && u.isRef(name)) url = name, name = null
355357 if (!url && !email) return name || JSON.stringify(author)
356358 if (!url && email) url = 'mailto:' + email, email = null
357359 if (!name && email) name = email, email = null
358- if (!name && url) name = url
360 + var feed = u.isRef(url) && url[0] === '@' && url
361 + if (feed && name) title = this.app.getNameSync(feed)
362 + if (feed && !name) name = this.app.getNameSync(feed) // TODO: async
363 + if (url && !name) name = url
359364 var secondaryLink = email && h('a', {href: this.toUrl('mailto:' + email)}, email)
360365 return [
361- h('a', {href: this.toUrl(url)}, name),
366 + h('a', {href: this.toUrl(url), title: title}, name),
362367 secondaryLink ? [' (', secondaryLink, ')'] : ''
363368 ]
364369 }

Built with git-ssb-web