From 5b9f3701f58ca00c151498d16b6a839a91ba8643 Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Mon, 2 Apr 2018 12:58:53 +0900 Subject: Abolish common and misc directories --- src/common/text/parse/elements/code.ts | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 src/common/text/parse/elements/code.ts (limited to 'src/common/text/parse/elements/code.ts') 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()) - }; -}; -- cgit v1.2.3-freya