Trim text

This commit is contained in:
syuilo 2018-08-04 01:09:00 +09:00
parent b13f42645b
commit 420164c59a

View file

@ -103,6 +103,10 @@ export default async (user: IUser, data: Option, silent = false) => new Promise<
data.visibleUsers = data.visibleUsers.filter(x => x != null); data.visibleUsers = data.visibleUsers.filter(x => x != null);
} }
if (data.text) {
data.text = data.text.trim();
}
// Parse MFM // Parse MFM
const tokens = data.text ? parse(data.text) : []; const tokens = data.text ? parse(data.text) : [];