[FIX] parser: correctly parse pre node within a div with new lines

This commit is contained in:
Lucas Perais (lpe)
2021-12-02 18:06:03 +01:00
committed by Aaron Bohy
parent c1a973a4d8
commit 3c12519277
4 changed files with 46 additions and 0 deletions
+26
View File
@@ -255,6 +255,32 @@ describe("qweb parser", () => {
});
});
test("pre dom node with new line", async () => {
expect(parse(`<div><pre />\n</div>`)).toEqual({
type: 2,
tag: "div",
dynamicTag: null,
attrs: {},
on: {},
ref: null,
content: [
{
type: 2,
tag: "pre",
dynamicTag: null,
attrs: {},
on: {},
ref: null,
content: [],
model: null,
ns: null,
},
],
model: null,
ns: null,
});
});
// ---------------------------------------------------------------------------
// t-esc
// ---------------------------------------------------------------------------