mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-08 22:03:01 +02:00
fix: add v2 retrocompatible support for quoted admonitions (#9570)
This commit is contained in:
parent
2c0bf8a3d8
commit
7c32fc341f
3 changed files with 69 additions and 2 deletions
|
@ -1366,6 +1366,57 @@ before
|
|||
|
||||
\t\t:::
|
||||
|
||||
after
|
||||
`);
|
||||
});
|
||||
|
||||
it('transforms directives in quotes', () => {
|
||||
expect(
|
||||
admonitionTitleToDirectiveLabel(
|
||||
`
|
||||
before
|
||||
|
||||
> :::caution There be dragons
|
||||
>
|
||||
> This is the admonition content
|
||||
>
|
||||
> :::
|
||||
>
|
||||
>> :::caution There be dragons
|
||||
>>
|
||||
>> This is the admonition content
|
||||
>>
|
||||
>> :::
|
||||
> > :::caution There be dragons
|
||||
> >
|
||||
> > This is the admonition content
|
||||
> >
|
||||
> > :::
|
||||
|
||||
after
|
||||
`,
|
||||
directives,
|
||||
),
|
||||
).toBe(`
|
||||
before
|
||||
|
||||
> :::caution[There be dragons]
|
||||
>
|
||||
> This is the admonition content
|
||||
>
|
||||
> :::
|
||||
>
|
||||
>> :::caution[There be dragons]
|
||||
>>
|
||||
>> This is the admonition content
|
||||
>>
|
||||
>> :::
|
||||
> > :::caution[There be dragons]
|
||||
> >
|
||||
> > This is the admonition content
|
||||
> >
|
||||
> > :::
|
||||
|
||||
after
|
||||
`);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue