diff --git a/src/mfm/parse/elements/inline-code.ts b/src/mfm/parse/elements/inline-code.ts index 1dd5affa5..e4ab49958 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; }