diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2018-11-21 05:11:00 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-21 05:11:00 +0900 |
| commit | 79ffbf95db9d0cc019d06ab93b1bfa6ba0d4f9ae (patch) | |
| tree | 884a18e6735f8557eb392929fcfa2dc1ae09cb6d /src/mfm/parse/elements/inline-code.ts | |
| parent | Refactor checkMongoDb (#3339) (diff) | |
| download | sharkey-79ffbf95db9d0cc019d06ab93b1bfa6ba0d4f9ae.tar.gz sharkey-79ffbf95db9d0cc019d06ab93b1bfa6ba0d4f9ae.tar.bz2 sharkey-79ffbf95db9d0cc019d06ab93b1bfa6ba0d4f9ae.zip | |
Improve MFM parser (#3337)
* wip
* wip
* Refactor
* Refactor
* wip
* wip
* wip
* wip
* Refactor
* Refactor
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* Clean up
* Update misskey-flavored-markdown.ts
* wip
* wip
* wip
* wip
* Update parser.ts
* wip
* Add new test
* wip
* Add new test
* Add new test
* wip
* Refactor
* Update parse.ts
* Refactor
* Update parser.ts
* wip
Diffstat (limited to 'src/mfm/parse/elements/inline-code.ts')
| -rw-r--r-- | src/mfm/parse/elements/inline-code.ts | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/mfm/parse/elements/inline-code.ts b/src/mfm/parse/elements/inline-code.ts deleted file mode 100644 index efacd734cb..0000000000 --- a/src/mfm/parse/elements/inline-code.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Code (inline) - */ - -import genHtml from '../core/syntax-highlighter'; - -export type TextElementInlineCode = { - type: 'inline-code'; - content: string; - code: string; - html: string; -}; - -export default function(text: string) { - const match = text.match(/^`(.+?)`/); - if (!match) return null; - if (match[1].includes('ยด')) return null; - const code = match[0]; - return { - type: 'inline-code', - content: code, - code: match[1], - html: genHtml(match[1]) - } as TextElementInlineCode; -} |