add mfm support

This commit is contained in:
Moon.eth
2026-07-29 15:13:45 +09:00
parent 110b659213
commit f51c576952
11 changed files with 826 additions and 8 deletions
+18
View File
@@ -48,3 +48,21 @@ describe('BlogEntry YouTube embeds', () => {
expect(view.getByTitle('YouTube video')).toBeInTheDocument()
})
})
describe('BlogEntry MFM rendering', () => {
it('renders the Pleroma API MFM HTML inside a backend-free blog entry', () => {
const view = renderEntry({
content:
'<p>It <span class="mfm-spin" data-mfm-speed="2s" data-mfm-left>works</span></p>',
})
const effect = view.getByText('works')
expect(effect).toHaveClass('mfm', '-pause')
expect(effect).toHaveAttribute('data-mfm-operator', 'spin')
expect(effect).toHaveStyle({
animationName: 'mfm-spin',
animationDuration: '2s',
animationDirection: 'reverse',
})
})
})