|
|
|
|
@ -223,6 +223,22 @@ describe('node/markdown/plugins/containers', () => {
|
|
|
|
|
`)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// FIXME: enable after attrs plugin version bump
|
|
|
|
|
test.skip('respects attrs plugin options on the fence line', async () => {
|
|
|
|
|
const delimiters = await render(
|
|
|
|
|
'::: tip Custom %(.extra-class)%\ncontent\n:::',
|
|
|
|
|
{ attrs: { left: '%(', right: ')%' } }
|
|
|
|
|
)
|
|
|
|
|
expect(delimiters).toContain('<div class="extra-class tip custom-block">')
|
|
|
|
|
|
|
|
|
|
const allowed = await render(
|
|
|
|
|
'::: tip Custom {.extra-class data-x=1}\ncontent\n:::',
|
|
|
|
|
{ attrs: { allowed: ['class'] } }
|
|
|
|
|
)
|
|
|
|
|
expect(allowed).toContain('<div class="extra-class tip custom-block">')
|
|
|
|
|
expect(allowed).not.toContain('data-x')
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
test('keeps fence line braces verbatim when attrs are disabled', async () => {
|
|
|
|
|
expect(
|
|
|
|
|
await render('::: details Click me {open}\ncontent\n:::', {
|
|
|
|
|
|