diff --git a/src/mfm/html.ts b/src/mfm/html.ts
index 2e38fe10a0..b7fa5b6f03 100644
--- a/src/mfm/html.ts
+++ b/src/mfm/html.ts
@@ -4,10 +4,7 @@ const { JSDOM } = jsdom;
import config from '../config';
import { INote } from '../models/note';
import { TextElement } from './parse';
-
-function intersperse(sep: T, xs: T[]): T[] {
- return [].concat(...xs.map(x => [sep, x])).slice(1);
-}
+import { intersperse } from '../prelude/array';
const handlers: { [key: string]: (window: any, token: any, mentionedRemoteUsers: INote['mentionedRemoteUsers']) => void } = {
bold({ document }, { bold }) {
diff --git a/src/prelude/array.ts b/src/prelude/array.ts
index e944030a7f..aee17640ed 100644
--- a/src/prelude/array.ts
+++ b/src/prelude/array.ts
@@ -5,3 +5,7 @@ export function countIf(f: (x: T) => boolean, xs: T[]): number {
export function count(x: T, xs: T[]): number {
return countIf(y => x === y, xs);
}
+
+export function intersperse(sep: T, xs: T[]): T[] {
+ return [].concat(...xs.map(x => [sep, x])).slice(1);
+}