one last fix please

This commit is contained in:
Jesse Wierzbinski 2024-04-09 23:47:11 -10:00
parent 607711c8b4
commit 63f046d281
No known key found for this signature in database

View file

@ -293,13 +293,15 @@ export const createNewStatus = async (
await sanitizeHtml(await parse(content["text/markdown"].content)), await sanitizeHtml(await parse(content["text/markdown"].content)),
); );
} else if (content["text/plain"]) { } else if (content["text/plain"]) {
htmlContent = linkifyStr(content["text/plain"].content);
// Split by newline and add <p> tags // Split by newline and add <p> tags
htmlContent = htmlContent htmlContent = content["text/plain"].content
.split("\n") .split("\n")
.map((line) => `<p>${line}</p>`) .map((line) => `<p>${line}</p>`)
.join("\n"); .join("\n");
htmlContent = linkifyHtml(
await replaceTextMentions(htmlContent, mentions ?? []),
);
} else { } else {
htmlContent = ""; htmlContent = "";
} }