diff options
Diffstat (limited to 'src/mfm/parse/elements/inline-code.ts')
| -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; } |