function buildCommentHTML(comment) { var depthClass = "" var githubIcon = "" var twitterIcon = "" var customClass = "" 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") %>' } if (comment.user.github_username && comment.user.github_username.length > 0) { githubIcon = '<%= image_tag("github-logo.svg", class:"icon-img") %>' } if (comment.newly_created) { customClass = "comment-created-via-fetch" } return '\
\