Refactor (5)
This commit is contained in:
2 files changed
+17
-5
No files matched your search
@@ -72,3 +72,9 @@ export async function expandReplyTree(
|
||||
}
|
||||
return { last: current, history: history.reverse() };
|
||||
}
|
||||
|
||||
export const sanitizeText = (text: string) =>
|
||||
text
|
||||
.replaceAll(/(\r\n|\r|\n)\s+/g, "\n\n") // remove extra newlines
|
||||
.replaceAll("@", "") // remove mentions
|
||||
.replaceAll("#", ""); // remove hashtags
|
||||
Reference in new issue
Block a user