Files
owl/tests/compiler/__snapshots__/white_space.test.ts.snap
T
Lucas Perais (lpe) b902edc1be [IMP] app, compiler: introduce t-out
t-out automatically escaped content when it is a string not marked
with the `markup` function

t-out renders the raw content if it is a Block, or if it has been marked
with the `markup` funtion.

t-esc has been kept since it is safe and is optimized to render text nodes.

all t-raw calls are in fact the same as t-out.
2022-02-11 10:41:18 +01:00

90 lines
3.0 KiB
Plaintext

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`white space handling consecutives whitespaces are condensed into a single space 1`] = `
"function anonymous(bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component } = bdom;
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
let block1 = createBlock(\`<div> abc </div>\`);
return function template(ctx, node, key = \\"\\") {
return block1();
}
}"
`;
exports[`white space handling nothing is done in pre tags 1`] = `
"function anonymous(bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component } = bdom;
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
let block1 = createBlock(\`<pre> </pre>\`);
return function template(ctx, node, key = \\"\\") {
return block1();
}
}"
`;
exports[`white space handling nothing is done in pre tags 2`] = `
"function anonymous(bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component } = bdom;
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
let block1 = createBlock(\`<pre>
some text
</pre>\`);
return function template(ctx, node, key = \\"\\") {
return block1();
}
}"
`;
exports[`white space handling nothing is done in pre tags 3`] = `
"function anonymous(bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component } = bdom;
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
let block1 = createBlock(\`<pre>
</pre>\`);
return function template(ctx, node, key = \\"\\") {
return block1();
}
}"
`;
exports[`white space handling white space only text nodes are condensed into a single space 1`] = `
"function anonymous(bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component } = bdom;
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
let block1 = createBlock(\`<div> </div>\`);
return function template(ctx, node, key = \\"\\") {
return block1();
}
}"
`;
exports[`white space handling whitespace only text nodes with newlines are removed 1`] = `
"function anonymous(bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component } = bdom;
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
let block1 = createBlock(\`<div><span>abc</span></div>\`);
return function template(ctx, node, key = \\"\\") {
return block1();
}
}"
`;