summaryrefslogtreecommitdiff
path: root/src/mfm/parse/elements/inline-code.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-08-15 20:23:50 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-08-15 20:23:50 +0900
commit69ac7b739f5579cfbdc392ad548c29f3cbfe7dde (patch)
tree7c6564e1d29321e994b1f1bf95879de01dbea8d9 /src/mfm/parse/elements/inline-code.ts
parentFix #2229 (diff)
downloadmisskey-69ac7b739f5579cfbdc392ad548c29f3cbfe7dde.tar.gz
misskey-69ac7b739f5579cfbdc392ad548c29f3cbfe7dde.tar.bz2
misskey-69ac7b739f5579cfbdc392ad548c29f3cbfe7dde.zip
Improve MFM
Diffstat (limited to 'src/mfm/parse/elements/inline-code.ts')
-rw-r--r--src/mfm/parse/elements/inline-code.ts5
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;
}