fix: remove $[center] MFM function

This commit is contained in:
naskya 2024-05-16 04:49:49 +09:00
parent 4b96063c23
commit a18ad132be
No known key found for this signature in database
GPG Key ID: 712D413B3A9FED5C
4 changed files with 3 additions and 15 deletions

View File

@ -8,6 +8,8 @@ Critical security updates are indicated by the :warning: icon.
## Unreleased
- Improve timeline UX
- Remove `$[center]` MFM function
- This function was suddenly added last year (https://firefish.dev/firefish/firefish/-/commit/1a971efa689323d54eebb4d3646e102fb4d1d95a), but according to the [MFM spec](https://github.com/misskey-dev/mfm.js/blob/develop/docs/syntax.md#fn), `$[something]` must be an inline element (while `center` is a block element), so such a syntax is not expected by MFM renderers. Please use `<center></center>` instead.
- Fix bugs
## [v20240504](https://firefish.dev/firefish/firefish/-/merge_requests/10790/commits)

View File

@ -349,17 +349,6 @@ export default defineComponent({
),
];
}
case "center": {
return [
h(
"div",
{
style: "text-align: center;",
},
genEl(token.children),
),
];
}
}
if (style == null) {
return [

View File

@ -464,9 +464,7 @@ const preview_bold = ref(`**${i18n.ts._mfm.dummy}**`);
const preview_small = ref(
`<small>${i18n.ts._mfm.dummy}</small> $[small ${i18n.ts._mfm.dummy}]`,
);
const preview_center = ref(
`<center>${i18n.ts._mfm.dummy}</center>\n$[center ${i18n.ts._mfm.dummy}]`,
);
const preview_center = ref(`<center>${i18n.ts._mfm.dummy}</center>`);
const preview_inlineCode = ref('`<: "Hello, world!"`');
const preview_blockCode = ref(
'```\n~ (#i, 100) {\n\t<: ? ((i % 15) = 0) "FizzBuzz"\n\t\t.? ((i % 3) = 0) "Fizz"\n\t\t.? ((i % 5) = 0) "Buzz"\n\t\t. i\n}\n```',

View File

@ -22,5 +22,4 @@ export const MFM_TAGS = [
"rotate",
"fade",
"small",
"center",
];