diff options
| author | Akihiko Odaki <nekomanma@pixiv.co.jp> | 2018-04-02 12:58:53 +0900 |
|---|---|---|
| committer | Akihiko Odaki <nekomanma@pixiv.co.jp> | 2018-04-02 12:58:53 +0900 |
| commit | 5b9f3701f58ca00c151498d16b6a839a91ba8643 (patch) | |
| tree | d32620bf206288b204060672a0088b4b0c7fa5eb /src/common/text/parse/elements/code.ts | |
| parent | Merge branch 'master' of https://github.com/syuilo/misskey (diff) | |
| download | sharkey-5b9f3701f58ca00c151498d16b6a839a91ba8643.tar.gz sharkey-5b9f3701f58ca00c151498d16b6a839a91ba8643.tar.bz2 sharkey-5b9f3701f58ca00c151498d16b6a839a91ba8643.zip | |
Abolish common and misc directories
Diffstat (limited to 'src/common/text/parse/elements/code.ts')
| -rw-r--r-- | src/common/text/parse/elements/code.ts | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/common/text/parse/elements/code.ts b/src/common/text/parse/elements/code.ts deleted file mode 100644 index 4821e95fe2..0000000000 --- a/src/common/text/parse/elements/code.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Code (block) - */ - -import genHtml from '../core/syntax-highlighter'; - -module.exports = text => { - const match = text.match(/^```([\s\S]+?)```/); - if (!match) return null; - const code = match[0]; - return { - type: 'code', - content: code, - code: code.substr(3, code.length - 6).trim(), - html: genHtml(code.substr(3, code.length - 6).trim()) - }; -}; |