diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-08-15 20:23:50 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-08-15 20:23:50 +0900 |
| commit | 69ac7b739f5579cfbdc392ad548c29f3cbfe7dde (patch) | |
| tree | 7c6564e1d29321e994b1f1bf95879de01dbea8d9 /src/mfm/parse/elements | |
| parent | Fix #2229 (diff) | |
| download | misskey-69ac7b739f5579cfbdc392ad548c29f3cbfe7dde.tar.gz misskey-69ac7b739f5579cfbdc392ad548c29f3cbfe7dde.tar.bz2 misskey-69ac7b739f5579cfbdc392ad548c29f3cbfe7dde.zip | |
Improve MFM
Diffstat (limited to 'src/mfm/parse/elements')
| -rw-r--r-- | src/mfm/parse/elements/inline-code.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mfm/parse/elements/inline-code.ts b/src/mfm/parse/elements/inline-code.ts index 1dd5affa51..e4ab499584 100644 --- a/src/mfm/parse/elements/inline-code.ts +++ b/src/mfm/parse/elements/inline-code.ts @@ -14,11 +14,12 @@ export type TextElementInlineCode = { 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: code.substr(1, code.length - 2).trim(), - html: genHtml(code.substr(1, code.length - 2).trim()) + code: match[1], + html: genHtml(match[1]) } as TextElementInlineCode; } |