mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
one last fix please
This commit is contained in:
parent
607711c8b4
commit
63f046d281
|
|
@ -293,13 +293,15 @@ export const createNewStatus = async (
|
|||
await sanitizeHtml(await parse(content["text/markdown"].content)),
|
||||
);
|
||||
} else if (content["text/plain"]) {
|
||||
htmlContent = linkifyStr(content["text/plain"].content);
|
||||
|
||||
// Split by newline and add <p> tags
|
||||
htmlContent = htmlContent
|
||||
htmlContent = content["text/plain"].content
|
||||
.split("\n")
|
||||
.map((line) => `<p>${line}</p>`)
|
||||
.join("\n");
|
||||
|
||||
htmlContent = linkifyHtml(
|
||||
await replaceTextMentions(htmlContent, mentions ?? []),
|
||||
);
|
||||
} else {
|
||||
htmlContent = "";
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue