mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-29 00:46: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) {
|
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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue