diff options
Diffstat (limited to 'src/api/common/text/elements/code.ts')
| -rw-r--r-- | src/api/common/text/elements/code.ts | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/api/common/text/elements/code.ts b/src/api/common/text/elements/code.ts deleted file mode 100644 index 4821e95fe2..0000000000 --- a/src/api/common/text/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()) - }; -}; |