From b0e00da2f713540c4fa2e6156b9e67e6e9a3739a Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Tue, 29 Jan 2019 20:33:28 +0900 Subject: Fix #4034 (#4037) * Fix #4034 * improve --- src/mfm/html.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mfm/html.ts b/src/mfm/html.ts index 6dba6defe3..61d2d7b5af 100644 --- a/src/mfm/html.ts +++ b/src/mfm/html.ts @@ -157,7 +157,7 @@ export default (tokens: MfmForest, mentionedRemoteUsers: INote['mentionedRemoteU text(token) { const el = doc.createElement('span'); - const nodes = (token.node.props.text as string).split('\n').map(x => doc.createTextNode(x)); + const nodes = (token.node.props.text as string).split(/\r\n|\r|\n/).map(x => doc.createTextNode(x)); for (const x of intersperse('br', nodes)) { el.appendChild(x === 'br' ? doc.createElement('br') : x); -- cgit v1.2.3-freya