diff options
| author | rinsuki <428rinsuki+git@gmail.com> | 2018-06-17 19:55:39 +0900 |
|---|---|---|
| committer | rinsuki <428rinsuki+git@gmail.com> | 2018-06-17 19:55:39 +0900 |
| commit | 8c40917cc2762a498cd2d35a4f4f69b01de3d672 (patch) | |
| tree | b2e32a07e1fb85964558428068f745a1c299118f /src/text/html.ts | |
| parent | build:ts success (diff) | |
| download | sharkey-8c40917cc2762a498cd2d35a4f4f69b01de3d672.tar.gz sharkey-8c40917cc2762a498cd2d35a4f4f69b01de3d672.tar.bz2 sharkey-8c40917cc2762a498cd2d35a4f4f69b01de3d672.zip | |
[noImplicitAny: true] src/text
Diffstat (limited to 'src/text/html.ts')
| -rw-r--r-- | src/text/html.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/text/html.ts b/src/text/html.ts index b55d9b80a7..41adb2e7f7 100644 --- a/src/text/html.ts +++ b/src/text/html.ts @@ -1,7 +1,8 @@ -import { lib as emojilib } from 'emojilib'; +const { lib: emojilib } = require('emojilib'); import { JSDOM } from 'jsdom'; import config from '../config'; import { INote } from '../models/note'; +import { TextElement } from './parse'; const handlers: {[key: string]: (window: any, token: any, mentionedRemoteUsers: INote["mentionedRemoteUsers"]) => void} = { bold({ document }, { bold }) { @@ -90,7 +91,7 @@ const handlers: {[key: string]: (window: any, token: any, mentionedRemoteUsers: } }; -export default (tokens, mentionedRemoteUsers: INote['mentionedRemoteUsers'] = []) => { +export default (tokens: TextElement[], mentionedRemoteUsers: INote['mentionedRemoteUsers'] = []) => { const { window } = new JSDOM(''); for (const token of tokens) { |