So siehts ganz gut aus !

This commit is contained in:
2019-04-03 17:44:16 +02:00
parent 3695b33c83
commit 0fe884c90a
6758 changed files with 530485 additions and 65 deletions
+15
View File
@@ -0,0 +1,15 @@
exports[`test #2436 - block with a same name extends from different layout in nesting 1`] = `
"
<h1>layout </h1>
<p>Main A</p>
<h1>other layout</h1>
<p>Other A</p>"
`;
exports[`test #2436 - block with a same name extends from the same layout in nesting 1`] = `
"
<h1>layout </h1>
<p>Main A</p>
<h1>layout </h1>
<p>Other A</p>"
`;
+17
View File
@@ -0,0 +1,17 @@
const pug = require('../../');
test('#2436 - block with a same name extends from the same layout in nesting', () => {
const output = pug.renderFile(
__dirname + '/issue1.pug',
{pretty: true}
);
expect(output).toMatchSnapshot();
});
test('#2436 - block with a same name extends from different layout in nesting', () => {
const output = pug.renderFile(
__dirname + '/issue2.pug',
{pretty: true}
);
expect(output).toMatchSnapshot();
});
+7
View File
@@ -0,0 +1,7 @@
extends layout.pug
block a
p Main A
block b
include other1.pug
+7
View File
@@ -0,0 +1,7 @@
extends layout.pug
block a
p Main A
block b
include other2.pug
+6
View File
@@ -0,0 +1,6 @@
h1 layout
block a
p block in layout
block b
+4
View File
@@ -0,0 +1,4 @@
extends layout.pug
block a
p Other A
+4
View File
@@ -0,0 +1,4 @@
extends other_layout.pug
block a
p Other A
+4
View File
@@ -0,0 +1,4 @@
h1 other layout
block a
p block in other layout