function buildCommentHTML(comment) {
var depthClass = "";
var githubIcon = "";
var twitterIcon = "";
var customClass = "";
var detailsStartHTML = "";
var detailsFinishHTML = "";
var body = "";
if (!comment.newly_created) {
depthClass="child flat-node"
} else if (comment.depth == 0 ){
depthClass = "root";
} else if (comment.depth < 3) {
depthClass="child"
} else {
depthClass="child flat-node"
}
if (comment.user.twitter_username && comment.user.twitter_username.length > 0) {
twitterIcon = '<%= image_tag("twitter-logo.svg", class:"icon-img", alt: "twitter logo") %>'
}
if (comment.user.github_username && comment.user.github_username.length > 0) {
githubIcon = '<%= image_tag("github-logo.svg", class:"icon-img", alt: "github logo") %>'
}
if (comment.newly_created) {
customClass = "comment-created-via-fetch"
}
if (comment.depth < 3) {
detailsStartHTML = '
'
detailsFinishHTML = '