mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-01 10:22:30 +02:00
docs: use BrowserWindow for Markdown demos (#6215)
This commit is contained in:
parent
5132ecdeee
commit
0fa091a0c2
9 changed files with 101 additions and 32 deletions
|
@ -134,14 +134,10 @@ const plugin = (options) => {
|
|||
let number = 1;
|
||||
visit(ast, 'heading', (node) => {
|
||||
if (node.depth === 2 && node.children.length > 0) {
|
||||
if (node.children[0].type === 'text') {
|
||||
node.children[0].value = `Section ${number}. ${node.children[0].value}`;
|
||||
} else {
|
||||
node.children.unshift({
|
||||
type: 'text',
|
||||
value: `Section ${number}. `,
|
||||
});
|
||||
}
|
||||
node.children.unshift({
|
||||
type: 'text',
|
||||
value: `Section ${number}. `,
|
||||
});
|
||||
number++;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue