mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-25 08:26:43 -06:00
Improve MFM
This commit is contained in:
parent
9ccf9a2496
commit
69ac7b739f
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue