Improve MFM

This commit is contained in:
syuilo 2018-08-15 20:23:50 +09:00
parent 9ccf9a2496
commit 69ac7b739f
1 changed files with 3 additions and 2 deletions

View File

@ -14,11 +14,12 @@ export type TextElementInlineCode = {
export default function(text: string) { export default function(text: string) {
const match = text.match(/^`(.+?)`/); const match = text.match(/^`(.+?)`/);
if (!match) return null; if (!match) return null;
if (match[1].includes('´')) return null;
const code = match[0]; const code = match[0];
return { return {
type: 'inline-code', type: 'inline-code',
content: code, content: code,
code: code.substr(1, code.length - 2).trim(), code: match[1],
html: genHtml(code.substr(1, code.length - 2).trim()) html: genHtml(match[1])
} as TextElementInlineCode; } as TextElementInlineCode;
} }