import { formatDatesInComments } from "https://esm.town/v/willthereader/formatDatesInComments";
import { parentCommentChecker } from "https://esm.town/v/willthereader/parentCommentChecker";
import { replaceHTMLWithTextFormatting } from "https://esm.town/v/willthereader/replaceHtmlWithTextFormatting";
export function formattingEmailContent(commentsArray) {
let commentsString = "";
for (let comment of commentsArray) {
if (comment.parentComment == null)
commentsString += `${comment.authorName}\n${comment.commentText}\n
${comment.createdAt}\n\n\n`;
else {
commentsString += `${comment.parentComment}\n${comment.authorName}
\n${comment.commentText}\n${comment.createdAt}\n\n\n`;
}
}
}