module.exports = function() { this.compilePostCommentsHtml = (comments, next_comment, post_id, post_url, morechildren_ids, post_author) => { return new Promise((resolve, reject) => { (async () => { let comments_html if(comments.author !== undefined && comments.body_html !== undefined) { let classlist = [] let submitter_link = '' let moderator = false let submitter = false let edited_span = '' if(post_author === comments.author) { classlist.push('submitter') submitter_link = `[S]` submitter = true } if(comments.distinguished === 'moderator') { classlist.push('green') moderator_badge = ` [M]` moderator = true } if(comments.score_hidden) { ups = `[score hidden]` } else { ups = `${kFormatter(comments.ups)} points` } if(comments.edited) { edited_span = `*` } comments_html = `
${comments.author}${moderator ? moderator_badge : ''}
${ups}
${timeDifference(comments.created)}${edited_span}
${comments.stickied ? 'stickied comment' : ''}
${comments.author}${submitter ? submitter_link : ''}${moderator ? moderator_badge : ''}
${ups}
${timeDifference(comments.created)}${edited_span}
${comments.stickied ? 'stickied comment' : ''}
${comment.author}${moderator ? moderator_badge : ''}
${ups}
${timeDifference(comment.created)}${edited_span}
${comment.stickied ? 'stickied comment' : ''}
${comment.author}${submitter ? submitter_link : ''}${moderator ? moderator_badge : ''}
${ups}
${timeDifference(comment.created)}${edited_span}
${comment.stickied ? 'stickied comment' : ''}