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 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 } comments_html = `
${comments.author}${moderator ? moderator_badge : ''}
${kFormatter(comments.ups)} points
${timeDifference(comments.created)}
${comments.stickied ? 'stickied comment' : ''}
${comments.author}${submitter ? submitter_link : ''}${moderator ? moderator_badge : ''}
${kFormatter(comments.ups)} points
${timeDifference(comments.created)}
${comments.stickied ? 'stickied comment' : ''}
${comment.author}${moderator ? moderator_badge : ''}
${kFormatter(comment.ups)} points
${timeDifference(comment.created)}
${comment.stickied ? 'stickied comment' : ''}
${comment.author}${submitter ? submitter_link : ''}${moderator ? moderator_badge : ''}
${kFormatter(comment.ups)} points
${timeDifference(comment.created)}
${comment.stickied ? 'stickied comment' : ''}