mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2025-01-27 01:46:25 -07:00
Improve MFM
This commit is contained in:
parent
509bbcc569
commit
e09e54694e
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