trim linebreaks

master
f0x 6 years ago
parent 128f6bef08
commit dce91ce8e7

@ -82,6 +82,8 @@ function parseEvent(event, context) {
html = true
}
body = body.trim()
let parsedReply = parseReply(event, body)
if (parsedReply.isReply) {
// body with fallback stripped

@ -22,15 +22,13 @@ let User = create({
getInitialState: function() {
let icon = jdenticon.toSvg(this.props.user.userId, 200)
let match = icon.match(/#([a-f0-9]{6})/g)
console.log(match, icon)
let color = '#ff0000'
for(let i=match.length-1; i>= 0; i--) {
color = match[i]
let r = color.substr(1, 2)
let g = color.substr(3, 2)
let b = color.substr(5, 2)
console.log(r, g, b)
if (r != g && g != b) { //greyscale
if (r != g && g != b) { // not greyscale
break
}
}

Loading…
Cancel
Save