Merge pull request #1637 from sveltejs/list-whitespace

Preserve whitespace in lists
pull/1644/merge
Rich Harris 6 years ago committed by GitHub
commit cce6db40f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -120,10 +120,10 @@ export default class Block {
this.builders.claim.addLine(`${name} = ${claimStatement || renderStatement};`);
if (parentNode) {
this.builders.mount.addLine(`@appendNode(${name}, ${parentNode});`);
this.builders.mount.addLine(`@append(${parentNode}, ${name});`);
if (parentNode === 'document.head') this.builders.destroy.addLine(`@detachNode(${name});`);
} else {
this.builders.mount.addLine(`@insertNode(${name}, #target, anchor);`);
this.builders.mount.addLine(`@insert(#target, ${name}, anchor);`);
if (!noDetach) this.builders.destroy.addConditional('detach', `@detachNode(${name});`);
}
}

@ -117,7 +117,7 @@ export default function dom(
var style = @createElement("style");
style.id = '${compiler.stylesheet.id}-style';
style.textContent = ${styles};
@appendNode(style, document.head);
@append(document.head, style);
}
`);
}

@ -288,14 +288,14 @@ export default class Element extends Node {
if (initialMountNode) {
block.builders.mount.addLine(
`@appendNode(${node}, ${initialMountNode});`
`@append(${initialMountNode}, ${node});`
);
if (initialMountNode === 'document.head') {
block.builders.destroy.addLine(`@detachNode(${node});`);
}
} else {
block.builders.mount.addLine(`@insertNode(${node}, #target, anchor);`);
block.builders.mount.addLine(`@insert(#target, ${node}, anchor);`);
// TODO we eventually need to consider what happens to elements
// that belong to the same outgroup as an outroing element...
@ -854,10 +854,10 @@ export default class Element extends Node {
const slot = this.attributes.find(attribute => attribute.name === 'slot');
if (slot) {
const prop = quotePropIfNecessary(slot.chunks[0].data);
return `@appendNode(${this.var}, ${name}._slotted${prop});`;
return `@append(${name}._slotted${prop}, ${this.var});`;
}
return `@appendNode(${this.var}, ${name}._slotted.default);`;
return `@append(${name}._slotted.default, ${this.var});`;
}
addCssClass(className = this.compiler.stylesheet.id) {

@ -22,7 +22,7 @@ export default class MustacheTag extends Tag {
}
remount(name: string) {
return `@appendNode(${this.var}, ${name}._slotted.default);`;
return `@append(${name}._slotted.default, ${this.var});`;
}
ssr() {

@ -91,7 +91,7 @@ export default class RawMustacheTag extends Tag {
}
remount(name: string) {
return `@appendNode(${this.var}, ${name}._slotted.default);`;
return `@append(${name}._slotted.default, ${this.var});`;
}
ssr() {

@ -85,17 +85,17 @@ export default class Slot extends Element {
if (parentNode) {
block.builders.mount.addBlock(deindent`
${mountLeadin} {
${needsAnchorBefore && `@appendNode(${anchorBefore} || (${anchorBefore} = @createComment()), ${parentNode});`}
@appendNode(${content_name}, ${parentNode});
${needsAnchorAfter && `@appendNode(${anchorAfter} || (${anchorAfter} = @createComment()), ${parentNode});`}
${needsAnchorBefore && `@append(${parentNode}, ${anchorBefore} || (${anchorBefore} = @createComment()));`}
@append(${parentNode}, ${content_name});
${needsAnchorAfter && `@append(${parentNode}, ${anchorAfter} || (${anchorAfter} = @createComment()));`}
}
`);
} else {
block.builders.mount.addBlock(deindent`
${mountLeadin} {
${needsAnchorBefore && `@insertNode(${anchorBefore} || (${anchorBefore} = @createComment()), #target, anchor);`}
@insertNode(${content_name}, #target, anchor);
${needsAnchorAfter && `@insertNode(${anchorAfter} || (${anchorAfter} = @createComment()), #target, anchor);`}
${needsAnchorBefore && `@insert(#target, ${anchorBefore} || (${anchorBefore} = @createComment()), anchor);`}
@insert(#target, ${content_name}, anchor);
${needsAnchorAfter && `@insert(#target, ${anchorAfter} || (${anchorAfter} = @createComment()), anchor);`}
}
`);
}

@ -9,10 +9,8 @@ const elementsWithoutText = new Set([
'audio',
'datalist',
'dl',
'ol',
'optgroup',
'select',
'ul',
'video',
]);
@ -39,8 +37,6 @@ export default class Text extends Node {
}
init(block: Block) {
const parentElement = this.findNearest(/(?:Element|Component)/);
if (shouldSkip(this)) {
this.shouldSkip = true;
return;
@ -65,7 +61,7 @@ export default class Text extends Node {
}
remount(name: string) {
return `@appendNode(${this.var}, ${name}._slotted.default);`;
return `@append(${name}._slotted.default, ${this.var});`;
}
ssr() {

@ -1,8 +1,8 @@
export function appendNode(node, target) {
export function append(target, node) {
target.appendChild(node);
}
export function insertNode(node, target, anchor) {
export function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}

@ -10,7 +10,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(p, target, anchor);
insert(target, p, anchor);
},
p: noop,
@ -53,7 +53,7 @@ function createElement(name) {
return document.createElement(name);
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}

@ -11,7 +11,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(p, target, anchor);
insert(target, p, anchor);
},
p: noop,
@ -76,7 +76,7 @@ function createElement(name) {
function noop() {}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}

@ -13,8 +13,8 @@ function create_main_fragment(component, ctx) {
},
m: function mount(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
insert(target, p, anchor);
append(p, text);
},
p: noop,
@ -73,11 +73,11 @@ function addLoc(element, file, line, column, char) {
};
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
function appendNode(node, target) {
function append(target, node) {
target.appendChild(node);
}

@ -10,7 +10,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(p, target, anchor);
insert(target, p, anchor);
},
p: noop,
@ -53,7 +53,7 @@ function createElement(name) {
return document.createElement(name);
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}

@ -10,7 +10,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(p, target, anchor);
insert(target, p, anchor);
},
p: noop,
@ -53,7 +53,7 @@ function createElement(name) {
return document.createElement(name);
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}

@ -10,7 +10,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(p, target, anchor);
insert(target, p, anchor);
},
p: noop,
@ -53,7 +53,7 @@ function createElement(name) {
return document.createElement(name);
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}

@ -19,9 +19,9 @@ var Main = (function(answer) { "use strict";
},
m(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
appendNode(text_1, p);
insert(target, p, anchor);
append(p, text);
append(p, text_1);
},
p(changed, ctx) {
@ -72,11 +72,11 @@ var Main = (function(answer) { "use strict";
return document.createTextNode(data);
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
function appendNode(node, target) {
function append(target, node) {
target.appendChild(node);
}

@ -10,7 +10,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(p, target, anchor);
insert(target, p, anchor);
},
p: noop,
@ -53,7 +53,7 @@ function createElement(name) {
return document.createElement(name);
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}

@ -10,7 +10,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(p, target, anchor);
insert(target, p, anchor);
},
p: noop,
@ -53,7 +53,7 @@ function createElement(name) {
return document.createElement(name);
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}

@ -11,9 +11,9 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(h1, target, anchor);
appendNode(text, h1);
appendNode(text_1, h1);
insert(target, h1, anchor);
append(h1, text);
append(h1, text_1);
},
p(changed, ctx) {
@ -67,11 +67,11 @@ function createText(data) {
return document.createTextNode(data);
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
function appendNode(node, target) {
function append(target, node) {
target.appendChild(node);
}

@ -5,7 +5,7 @@ function assign(tar, src) {
return tar;
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
@ -159,7 +159,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(a, target, anchor);
insert(target, a, anchor);
},
p: noop,

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
import { assign, createElement, detachNode, init, insert, noop, proto } from "svelte/shared.js";
function link(node) {
@ -29,7 +29,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(a, target, anchor);
insert(target, a, anchor);
},
p: noop,

@ -5,7 +5,7 @@ function assign(tar, src) {
return tar;
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
@ -179,7 +179,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(div, target, anchor);
insert(target, div, anchor);
div_resize_listener = addResizeListener(div, div_resize_handler);
},

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { addResizeListener, assign, callAll, createElement, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
import { addResizeListener, assign, callAll, createElement, detachNode, init, insert, noop, proto } from "svelte/shared.js";
function create_main_fragment(component, ctx) {
var div, div_resize_listener;
@ -16,7 +16,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(div, target, anchor);
insert(target, div, anchor);
div_resize_listener = addResizeListener(div, div_resize_handler);
},

@ -5,11 +5,11 @@ function assign(tar, src) {
return tar;
}
function appendNode(node, target) {
function append(target, node) {
target.appendChild(node);
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
@ -151,7 +151,7 @@ function add_css() {
var style = createElement("style");
style.id = 'svelte-1a7i8ec-style';
style.textContent = "p.svelte-1a7i8ec{color:red}";
appendNode(style, document.head);
append(document.head, style);
}
function create_main_fragment(component, ctx) {
@ -165,8 +165,8 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
insert(target, p, anchor);
append(p, text);
},
p(changed, ctx) {

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { appendNode, assign, createElement, createText, detachNode, init, insertNode, proto, setData } from "svelte/shared.js";
import { append, assign, createElement, createText, detachNode, init, insert, proto, setData } from "svelte/shared.js";
function data() {
return { foo: 42 }
@ -9,7 +9,7 @@ function add_css() {
var style = createElement("style");
style.id = 'svelte-1a7i8ec-style';
style.textContent = "p.svelte-1a7i8ec{color:red}";
appendNode(style, document.head);
append(document.head, style);
}
function create_main_fragment(component, ctx) {
@ -23,8 +23,8 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
insert(target, p, anchor);
append(p, text);
},
p(changed, ctx) {

@ -5,11 +5,11 @@ function assign(tar, src) {
return tar;
}
function appendNode(node, target) {
function append(target, node) {
target.appendChild(node);
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
@ -140,7 +140,7 @@ function add_css() {
var style = createElement("style");
style.id = 'svelte-1slhpfn-style';
style.textContent = "@media(min-width: 1px){div.svelte-1slhpfn{color:red}}";
appendNode(style, document.head);
append(document.head, style);
}
function create_main_fragment(component, ctx) {
@ -153,7 +153,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(div, target, anchor);
insert(target, div, anchor);
},
p: noop,

@ -1,11 +1,11 @@
/* generated by Svelte vX.Y.Z */
import { appendNode, assign, createElement, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
import { append, assign, createElement, detachNode, init, insert, noop, proto } from "svelte/shared.js";
function add_css() {
var style = createElement("style");
style.id = 'svelte-1slhpfn-style';
style.textContent = "@media(min-width: 1px){div.svelte-1slhpfn{color:red}}";
appendNode(style, document.head);
append(document.head, style);
}
function create_main_fragment(component, ctx) {
@ -18,7 +18,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(div, target, anchor);
insert(target, div, anchor);
},
p: noop,

@ -5,7 +5,7 @@ function assign(tar, src) {
return tar;
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
@ -143,7 +143,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(div, target, anchor);
insert(target, div, anchor);
},
p: noop,

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
import { assign, createElement, detachNode, init, insert, noop, proto } from "svelte/shared.js";
function create_main_fragment(component, ctx) {
var div;
@ -12,7 +12,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(div, target, anchor);
insert(target, div, anchor);
},
p: noop,

@ -5,11 +5,11 @@ function assign(tar, src) {
return tar;
}
function appendNode(node, target) {
function append(target, node) {
target.appendChild(node);
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
@ -179,7 +179,7 @@ function create_main_fragment(component, ctx) {
each_blocks[i].m(target, anchor);
}
insertNode(each_anchor, target, anchor);
insert(target, each_anchor, anchor);
},
p(changed, ctx) {
@ -226,8 +226,8 @@ function create_each_block(component, ctx) {
},
m(target, anchor) {
insertNode(span, target, anchor);
appendNode(text, span);
insert(target, span, anchor);
append(span, text);
},
p(changed, ctx) {

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { appendNode, assign, createComment, createElement, createText, destroyEach, detachNode, init, insertNode, proto, setData } from "svelte/shared.js";
import { append, assign, createComment, createElement, createText, destroyEach, detachNode, init, insert, proto, setData } from "svelte/shared.js";
function create_main_fragment(component, ctx) {
var each_anchor;
@ -26,7 +26,7 @@ function create_main_fragment(component, ctx) {
each_blocks[i].m(target, anchor);
}
insertNode(each_anchor, target, anchor);
insert(target, each_anchor, anchor);
},
p(changed, ctx) {
@ -73,8 +73,8 @@ function create_each_block(component, ctx) {
},
m(target, anchor) {
insertNode(span, target, anchor);
appendNode(text, span);
insert(target, span, anchor);
append(span, text);
},
p(changed, ctx) {

@ -11,11 +11,11 @@ function addLoc(element, file, line, column, char) {
};
}
function appendNode(node, target) {
function append(target, node) {
target.appendChild(node);
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
@ -187,10 +187,10 @@ function create_main_fragment(component, ctx) {
},
m: function mount(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
appendNode(text_1, p);
appendNode(text_2, p);
insert(target, p, anchor);
append(p, text);
append(p, text_1);
append(p, text_2);
},
p: function update(changed, ctx) {

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { addLoc, appendNode, assign, createElement, createText, detachNode, init, insertNode, protoDev, setData } from "svelte/shared.js";
import { addLoc, append, assign, createElement, createText, detachNode, init, insert, protoDev, setData } from "svelte/shared.js";
function bar({ foo }) {
return foo * 2;
@ -20,10 +20,10 @@ function create_main_fragment(component, ctx) {
},
m: function mount(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
appendNode(text_1, p);
appendNode(text_2, p);
insert(target, p, anchor);
append(p, text);
append(p, text_1);
append(p, text_2);
},
p: function update(changed, ctx) {

@ -5,7 +5,7 @@ function assign(tar, src) {
return tar;
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
@ -149,9 +149,9 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(div, target, anchor);
insertNode(text, target, anchor);
insertNode(div_1, target, anchor);
insert(target, div, anchor);
insert(target, text, anchor);
insert(target, div_1, anchor);
},
p(changed, ctx) {

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { assign, createElement, createText, detachNode, init, insertNode, proto } from "svelte/shared.js";
import { assign, createElement, createText, detachNode, init, insert, proto } from "svelte/shared.js";
function create_main_fragment(component, ctx) {
var div, text, div_1;
@ -14,9 +14,9 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(div, target, anchor);
insertNode(text, target, anchor);
insertNode(div_1, target, anchor);
insert(target, div, anchor);
insert(target, text, anchor);
insert(target, div_1, anchor);
},
p(changed, ctx) {

@ -5,7 +5,7 @@ function assign(tar, src) {
return tar;
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
@ -153,9 +153,9 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(div, target, anchor);
insertNode(text, target, anchor);
insertNode(div_1, target, anchor);
insert(target, div, anchor);
insert(target, text, anchor);
insert(target, div_1, anchor);
},
p(changed, ctx) {

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { assign, createElement, createText, detachNode, init, insertNode, proto, setAttribute } from "svelte/shared.js";
import { assign, createElement, createText, detachNode, init, insert, proto, setAttribute } from "svelte/shared.js";
function create_main_fragment(component, ctx) {
var div, text, div_1;
@ -14,9 +14,9 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(div, target, anchor);
insertNode(text, target, anchor);
insertNode(div_1, target, anchor);
insert(target, div, anchor);
insert(target, text, anchor);
insert(target, div_1, anchor);
},
p(changed, ctx) {

@ -5,11 +5,11 @@ function assign(tar, src) {
return tar;
}
function appendNode(node, target) {
function append(target, node) {
target.appendChild(node);
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
@ -153,9 +153,9 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(svg, target, anchor);
appendNode(g, svg);
appendNode(g_1, svg);
insert(target, svg, anchor);
append(svg, g);
append(svg, g_1);
},
p(changed, ctx) {

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { appendNode, assign, createSvgElement, detachNode, init, insertNode, proto, setAttribute } from "svelte/shared.js";
import { append, assign, createSvgElement, detachNode, init, insert, proto, setAttribute } from "svelte/shared.js";
function create_main_fragment(component, ctx) {
var svg, g, g_1;
@ -14,9 +14,9 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(svg, target, anchor);
appendNode(g, svg);
appendNode(g_1, svg);
insert(target, svg, anchor);
append(svg, g);
append(svg, g_1);
},
p(changed, ctx) {

@ -5,11 +5,11 @@ function assign(tar, src) {
return tar;
}
function appendNode(node, target) {
function append(target, node) {
target.appendChild(node);
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
@ -183,9 +183,9 @@ function create_main_fragment(component, ctx) {
each_blocks[i].m(target, anchor);
}
insertNode(text, target, anchor);
insertNode(p, target, anchor);
appendNode(text_1, p);
insert(target, text, anchor);
insert(target, p, anchor);
append(p, text_1);
},
p(changed, ctx) {
@ -248,17 +248,17 @@ function create_each_block(component, ctx) {
},
m(target, anchor) {
insertNode(div, target, anchor);
appendNode(strong, div);
appendNode(text, strong);
appendNode(text_1, div);
appendNode(span, div);
appendNode(text_2, span);
appendNode(text_3, span);
appendNode(text_4, span);
appendNode(text_5, span);
appendNode(text_6, div);
appendNode(raw_before, div);
insert(target, div, anchor);
append(div, strong);
append(strong, text);
append(div, text_1);
append(div, span);
append(span, text_2);
append(span, text_3);
append(span, text_4);
append(span, text_5);
append(div, text_6);
append(div, raw_before);
raw_before.insertAdjacentHTML("afterend", raw_value);
},

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { appendNode, assign, createElement, createText, destroyEach, detachAfter, detachNode, init, insertNode, proto, setData } from "svelte/shared.js";
import { append, assign, createElement, createText, destroyEach, detachAfter, detachNode, init, insert, proto, setData } from "svelte/shared.js";
function create_main_fragment(component, ctx) {
var text, p, text_1;
@ -28,9 +28,9 @@ function create_main_fragment(component, ctx) {
each_blocks[i].m(target, anchor);
}
insertNode(text, target, anchor);
insertNode(p, target, anchor);
appendNode(text_1, p);
insert(target, text, anchor);
insert(target, p, anchor);
append(p, text_1);
},
p(changed, ctx) {
@ -93,17 +93,17 @@ function create_each_block(component, ctx) {
},
m(target, anchor) {
insertNode(div, target, anchor);
appendNode(strong, div);
appendNode(text, strong);
appendNode(text_1, div);
appendNode(span, div);
appendNode(text_2, span);
appendNode(text_3, span);
appendNode(text_4, span);
appendNode(text_5, span);
appendNode(text_6, div);
appendNode(raw_before, div);
insert(target, div, anchor);
append(div, strong);
append(strong, text);
append(div, text_1);
append(div, span);
append(span, text_2);
append(span, text_3);
append(span, text_4);
append(span, text_5);
append(div, text_6);
append(div, raw_before);
raw_before.insertAdjacentHTML("afterend", raw_value);
},

@ -5,11 +5,11 @@ function assign(tar, src) {
return tar;
}
function appendNode(node, target) {
function append(target, node) {
target.appendChild(node);
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
@ -495,7 +495,7 @@ function create_main_fragment(component, ctx) {
m(target, anchor) {
for (i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].m(target, anchor);
insertNode(each_anchor, target, anchor);
insert(target, each_anchor, anchor);
},
p(changed, ctx) {
@ -531,8 +531,8 @@ function create_each_block(component, key_1, ctx) {
},
m(target, anchor) {
insertNode(div, target, anchor);
appendNode(text, div);
insert(target, div, anchor);
append(div, text);
},
p(changed, ctx) {

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { appendNode, assign, blankObject, createComment, createElement, createText, detachNode, fixAndOutroAndDestroyBlock, fixPosition, init, insertNode, proto, setData, updateKeyedEach, wrapAnimation } from "svelte/shared.js";
import { append, assign, blankObject, createComment, createElement, createText, detachNode, fixAndOutroAndDestroyBlock, fixPosition, init, insert, proto, setData, updateKeyedEach, wrapAnimation } from "svelte/shared.js";
function foo(node, animation, params) {
const dx = animation.from.left - animation.to.left;
@ -38,7 +38,7 @@ function create_main_fragment(component, ctx) {
m(target, anchor) {
for (i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].m(target, anchor);
insertNode(each_anchor, target, anchor);
insert(target, each_anchor, anchor);
},
p(changed, ctx) {
@ -74,8 +74,8 @@ function create_each_block(component, key_1, ctx) {
},
m(target, anchor) {
insertNode(div, target, anchor);
appendNode(text, div);
insert(target, div, anchor);
append(div, text);
},
p(changed, ctx) {

@ -5,11 +5,11 @@ function assign(tar, src) {
return tar;
}
function appendNode(node, target) {
function append(target, node) {
target.appendChild(node);
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
@ -262,7 +262,7 @@ function create_main_fragment(component, ctx) {
m(target, anchor) {
for (i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].m(target, anchor);
insertNode(each_anchor, target, anchor);
insert(target, each_anchor, anchor);
},
p(changed, ctx) {
@ -296,8 +296,8 @@ function create_each_block(component, key_1, ctx) {
},
m(target, anchor) {
insertNode(div, target, anchor);
appendNode(text, div);
insert(target, div, anchor);
append(div, text);
},
p(changed, ctx) {

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { appendNode, assign, blankObject, createComment, createElement, createText, destroyBlock, detachNode, init, insertNode, proto, setData, updateKeyedEach } from "svelte/shared.js";
import { append, assign, blankObject, createComment, createElement, createText, destroyBlock, detachNode, init, insert, proto, setData, updateKeyedEach } from "svelte/shared.js";
function create_main_fragment(component, ctx) {
var each_blocks_1 = [], each_lookup = blankObject(), each_anchor;
@ -24,7 +24,7 @@ function create_main_fragment(component, ctx) {
m(target, anchor) {
for (i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].m(target, anchor);
insertNode(each_anchor, target, anchor);
insert(target, each_anchor, anchor);
},
p(changed, ctx) {
@ -58,8 +58,8 @@ function create_each_block(component, key_1, ctx) {
},
m(target, anchor) {
insertNode(div, target, anchor);
appendNode(text, div);
insert(target, div, anchor);
append(div, text);
},
p(changed, ctx) {

@ -5,7 +5,7 @@ function assign(tar, src) {
return tar;
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
@ -154,7 +154,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(button, target, anchor);
insert(target, button, anchor);
},
p(changed, _ctx) {

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, proto } from "svelte/shared.js";
import { assign, createElement, detachNode, init, insert, proto } from "svelte/shared.js";
function foo( node, callback ) {
// code goes here
@ -24,7 +24,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(button, target, anchor);
insert(target, button, anchor);
},
p(changed, _ctx) {

@ -5,7 +5,7 @@ function assign(tar, src) {
return tar;
}
function appendNode(node, target) {
function append(target, node) {
target.appendChild(node);
}
@ -146,8 +146,8 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
appendNode(meta, document.head);
appendNode(meta_1, document.head);
append(document.head, meta);
append(document.head, meta_1);
},
p: noop,

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { appendNode, assign, createElement, detachNode, init, noop, proto } from "svelte/shared.js";
import { append, assign, createElement, detachNode, init, noop, proto } from "svelte/shared.js";
function create_main_fragment(component, ctx) {
var meta, meta_1;
@ -15,8 +15,8 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
appendNode(meta, document.head);
appendNode(meta_1, document.head);
append(document.head, meta);
append(document.head, meta_1);
},
p: noop,

@ -5,7 +5,7 @@ function assign(tar, src) {
return tar;
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
@ -155,7 +155,7 @@ function create_main_fragment(component, ctx) {
m(target, anchor) {
if_block.m(target, anchor);
insertNode(if_block_anchor, target, anchor);
insert(target, if_block_anchor, anchor);
},
p(changed, ctx) {
@ -187,7 +187,7 @@ function create_if_block(component, ctx) {
},
m(target, anchor) {
insertNode(p, target, anchor);
insert(target, p, anchor);
},
d(detach) {
@ -209,7 +209,7 @@ function create_if_block_1(component, ctx) {
},
m(target, anchor) {
insertNode(p, target, anchor);
insert(target, p, anchor);
},
d(detach) {

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { assign, createComment, createElement, detachNode, init, insertNode, proto } from "svelte/shared.js";
import { assign, createComment, createElement, detachNode, init, insert, proto } from "svelte/shared.js";
function create_main_fragment(component, ctx) {
var if_block_anchor;
@ -20,7 +20,7 @@ function create_main_fragment(component, ctx) {
m(target, anchor) {
if_block.m(target, anchor);
insertNode(if_block_anchor, target, anchor);
insert(target, if_block_anchor, anchor);
},
p(changed, ctx) {
@ -52,7 +52,7 @@ function create_if_block(component, ctx) {
},
m(target, anchor) {
insertNode(p, target, anchor);
insert(target, p, anchor);
},
d(detach) {
@ -74,7 +74,7 @@ function create_if_block_1(component, ctx) {
},
m(target, anchor) {
insertNode(p, target, anchor);
insert(target, p, anchor);
},
d(detach) {

@ -5,7 +5,7 @@ function assign(tar, src) {
return tar;
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
@ -149,7 +149,7 @@ function create_main_fragment(component, ctx) {
m(target, anchor) {
if (if_block) if_block.m(target, anchor);
insertNode(if_block_anchor, target, anchor);
insert(target, if_block_anchor, anchor);
},
p(changed, ctx) {
@ -185,7 +185,7 @@ function create_if_block(component, ctx) {
},
m(target, anchor) {
insertNode(p, target, anchor);
insert(target, p, anchor);
},
d(detach) {

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { assign, createComment, createElement, detachNode, init, insertNode, proto } from "svelte/shared.js";
import { assign, createComment, createElement, detachNode, init, insert, proto } from "svelte/shared.js";
function create_main_fragment(component, ctx) {
var if_block_anchor;
@ -14,7 +14,7 @@ function create_main_fragment(component, ctx) {
m(target, anchor) {
if (if_block) if_block.m(target, anchor);
insertNode(if_block_anchor, target, anchor);
insert(target, if_block_anchor, anchor);
},
p(changed, ctx) {
@ -50,7 +50,7 @@ function create_if_block(component, ctx) {
},
m(target, anchor) {
insertNode(p, target, anchor);
insert(target, p, anchor);
},
d(detach) {

@ -5,7 +5,7 @@ function assign(tar, src) {
return tar;
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
@ -147,7 +147,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(div, target, anchor);
insert(target, div, anchor);
},
p(changed, ctx) {

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, proto, setStyle } from "svelte/shared.js";
import { assign, createElement, detachNode, init, insert, proto, setStyle } from "svelte/shared.js";
function create_main_fragment(component, ctx) {
var div;
@ -12,7 +12,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(div, target, anchor);
insert(target, div, anchor);
},
p(changed, ctx) {

@ -5,7 +5,7 @@ function assign(tar, src) {
return tar;
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
@ -146,7 +146,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(div, target, anchor);
insert(target, div, anchor);
},
p(changed, ctx) {

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, proto, setStyle } from "svelte/shared.js";
import { assign, createElement, detachNode, init, insert, proto, setStyle } from "svelte/shared.js";
function create_main_fragment(component, ctx) {
var div;
@ -11,7 +11,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(div, target, anchor);
insert(target, div, anchor);
},
p(changed, ctx) {

@ -5,7 +5,7 @@ function assign(tar, src) {
return tar;
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
@ -146,7 +146,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(div, target, anchor);
insert(target, div, anchor);
},
p(changed, ctx) {

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, proto, setStyle } from "svelte/shared.js";
import { assign, createElement, detachNode, init, insert, proto, setStyle } from "svelte/shared.js";
function create_main_fragment(component, ctx) {
var div;
@ -11,7 +11,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(div, target, anchor);
insert(target, div, anchor);
},
p(changed, ctx) {

@ -5,7 +5,7 @@ function assign(tar, src) {
return tar;
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
@ -149,9 +149,9 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(div, target, anchor);
insertNode(text, target, anchor);
insertNode(div_1, target, anchor);
insert(target, div, anchor);
insert(target, text, anchor);
insert(target, div_1, anchor);
},
p(changed, ctx) {

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { assign, createElement, createText, detachNode, init, insertNode, proto } from "svelte/shared.js";
import { assign, createElement, createText, detachNode, init, insert, proto } from "svelte/shared.js";
function create_main_fragment(component, ctx) {
var div, text, div_1, div_1_style_value;
@ -14,9 +14,9 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(div, target, anchor);
insertNode(text, target, anchor);
insertNode(div_1, target, anchor);
insert(target, div, anchor);
insert(target, text, anchor);
insert(target, div_1, anchor);
},
p(changed, ctx) {

@ -5,7 +5,7 @@ function assign(tar, src) {
return tar;
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
@ -162,7 +162,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(input, target, anchor);
insert(target, input, anchor);
input.files = ctx.files;
},

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { addListener, assign, createElement, detachNode, init, insertNode, proto, removeListener, setAttribute } from "svelte/shared.js";
import { addListener, assign, createElement, detachNode, init, insert, proto, removeListener, setAttribute } from "svelte/shared.js";
function create_main_fragment(component, ctx) {
var input, input_updating = false;
@ -19,7 +19,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(input, target, anchor);
insert(target, input, anchor);
input.files = ctx.files;
},

@ -5,7 +5,7 @@ function assign(tar, src) {
return tar;
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
@ -164,7 +164,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(input, target, anchor);
insert(target, input, anchor);
input.value = ctx.value;
},

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { addListener, assign, createElement, detachNode, init, insertNode, proto, removeListener, setAttribute, toNumber } from "svelte/shared.js";
import { addListener, assign, createElement, detachNode, init, insert, proto, removeListener, setAttribute, toNumber } from "svelte/shared.js";
function create_main_fragment(component, ctx) {
var input;
@ -17,7 +17,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(input, target, anchor);
insert(target, input, anchor);
input.value = ctx.value;
},

@ -5,7 +5,7 @@ function assign(tar, src) {
return tar;
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
@ -159,7 +159,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(input, target, anchor);
insert(target, input, anchor);
input.checked = ctx.foo;
},

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { addListener, assign, createElement, detachNode, init, insertNode, proto, removeListener, setAttribute } from "svelte/shared.js";
import { addListener, assign, createElement, detachNode, init, insert, proto, removeListener, setAttribute } from "svelte/shared.js";
function create_main_fragment(component, ctx) {
var input;
@ -16,7 +16,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(input, target, anchor);
insert(target, input, anchor);
input.checked = ctx.foo;
},

@ -5,7 +5,7 @@ function assign(tar, src) {
return tar;
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
@ -148,7 +148,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(input, target, anchor);
insert(target, input, anchor);
},
p: noop,

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, noop, proto, setInputType } from "svelte/shared.js";
import { assign, createElement, detachNode, init, insert, noop, proto, setInputType } from "svelte/shared.js";
function create_main_fragment(component, ctx) {
var input;
@ -11,7 +11,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(input, target, anchor);
insert(target, input, anchor);
},
p: noop,

@ -5,7 +5,7 @@ function assign(tar, src) {
return tar;
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
@ -200,7 +200,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(audio, target, anchor);
insert(target, audio, anchor);
audio.volume = ctx.volume;
},

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { addListener, assign, callAll, createElement, detachNode, init, insertNode, proto, removeListener, timeRangesToArray } from "svelte/shared.js";
import { addListener, assign, callAll, createElement, detachNode, init, insert, proto, removeListener, timeRangesToArray } from "svelte/shared.js";
function create_main_fragment(component, ctx) {
var audio, audio_is_paused = true, audio_updating = false, audio_animationframe;
@ -53,7 +53,7 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(audio, target, anchor);
insert(target, audio, anchor);
audio.volume = ctx.volume;
},

@ -7,7 +7,7 @@ function assign(tar, src) {
return tar;
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
@ -158,7 +158,7 @@ function create_main_fragment(component, ctx) {
m(target, anchor) {
imported._mount(target, anchor);
insertNode(text, target, anchor);
insert(target, text, anchor);
nonimported._mount(target, anchor);
},

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { assign, callAll, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
import { assign, callAll, createText, detachNode, init, insert, noop, proto } from "svelte/shared.js";
import Imported from 'Imported.html';
@ -26,7 +26,7 @@ function create_main_fragment(component, ctx) {
m(target, anchor) {
imported._mount(target, anchor);
insertNode(text, target, anchor);
insert(target, text, anchor);
nonimported._mount(target, anchor);
},

@ -5,11 +5,11 @@ function assign(tar, src) {
return tar;
}
function appendNode(node, target) {
function append(target, node) {
target.appendChild(node);
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
@ -151,9 +151,9 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(svg, target, anchor);
appendNode(title, svg);
appendNode(text, title);
insert(target, svg, anchor);
append(svg, title);
append(title, text);
},
p: noop,

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { appendNode, assign, createSvgElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
import { append, assign, createSvgElement, createText, detachNode, init, insert, noop, proto } from "svelte/shared.js";
function create_main_fragment(component, ctx) {
var svg, title, text;
@ -12,9 +12,9 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(svg, target, anchor);
appendNode(title, svg);
appendNode(text, title);
insert(target, svg, anchor);
append(svg, title);
append(title, text);
},
p: noop,

@ -5,11 +5,11 @@ function assign(tar, src) {
return tar;
}
function appendNode(node, target) {
function append(target, node) {
target.appendChild(node);
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
@ -179,21 +179,21 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(div, target, anchor);
insert(target, div, anchor);
if (if_block) if_block.m(div, null);
appendNode(text, div);
appendNode(p, div);
appendNode(text_2, div);
append(div, text);
append(div, p);
append(div, text_2);
if (if_block_1) if_block_1.m(div, null);
appendNode(text_3, div);
append(div, text_3);
if (if_block_2) if_block_2.m(div, null);
appendNode(text_4, div);
appendNode(p_1, div);
appendNode(text_6, div);
append(div, text_4);
append(div, p_1);
append(div, text_6);
if (if_block_3) if_block_3.m(div, null);
insertNode(text_8, target, anchor);
insert(target, text_8, anchor);
if (if_block_4) if_block_4.m(target, anchor);
insertNode(if_block_4_anchor, target, anchor);
insert(target, if_block_4_anchor, anchor);
},
p(changed, ctx) {
@ -285,7 +285,7 @@ function create_if_block(component, ctx) {
},
m(target, anchor) {
insertNode(p, target, anchor);
insert(target, p, anchor);
},
d(detach) {
@ -307,7 +307,7 @@ function create_if_block_1(component, ctx) {
},
m(target, anchor) {
insertNode(p, target, anchor);
insert(target, p, anchor);
},
d(detach) {
@ -329,7 +329,7 @@ function create_if_block_2(component, ctx) {
},
m(target, anchor) {
insertNode(p, target, anchor);
insert(target, p, anchor);
},
d(detach) {
@ -351,7 +351,7 @@ function create_if_block_3(component, ctx) {
},
m(target, anchor) {
insertNode(p, target, anchor);
insert(target, p, anchor);
},
d(detach) {
@ -373,7 +373,7 @@ function create_if_block_4(component, ctx) {
},
m(target, anchor) {
insertNode(p, target, anchor);
insert(target, p, anchor);
},
d(detach) {

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { appendNode, assign, createComment, createElement, createText, detachNode, init, insertNode, proto } from "svelte/shared.js";
import { append, assign, createComment, createElement, createText, detachNode, init, insert, proto } from "svelte/shared.js";
function create_main_fragment(component, ctx) {
var div, text, p, text_2, text_3, text_4, p_1, text_6, text_8, if_block_4_anchor;
@ -36,21 +36,21 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(div, target, anchor);
insert(target, div, anchor);
if (if_block) if_block.m(div, null);
appendNode(text, div);
appendNode(p, div);
appendNode(text_2, div);
append(div, text);
append(div, p);
append(div, text_2);
if (if_block_1) if_block_1.m(div, null);
appendNode(text_3, div);
append(div, text_3);
if (if_block_2) if_block_2.m(div, null);
appendNode(text_4, div);
appendNode(p_1, div);
appendNode(text_6, div);
append(div, text_4);
append(div, p_1);
append(div, text_6);
if (if_block_3) if_block_3.m(div, null);
insertNode(text_8, target, anchor);
insert(target, text_8, anchor);
if (if_block_4) if_block_4.m(target, anchor);
insertNode(if_block_4_anchor, target, anchor);
insert(target, if_block_4_anchor, anchor);
},
p(changed, ctx) {
@ -142,7 +142,7 @@ function create_if_block(component, ctx) {
},
m(target, anchor) {
insertNode(p, target, anchor);
insert(target, p, anchor);
},
d(detach) {
@ -164,7 +164,7 @@ function create_if_block_1(component, ctx) {
},
m(target, anchor) {
insertNode(p, target, anchor);
insert(target, p, anchor);
},
d(detach) {
@ -186,7 +186,7 @@ function create_if_block_2(component, ctx) {
},
m(target, anchor) {
insertNode(p, target, anchor);
insert(target, p, anchor);
},
d(detach) {
@ -208,7 +208,7 @@ function create_if_block_3(component, ctx) {
},
m(target, anchor) {
insertNode(p, target, anchor);
insert(target, p, anchor);
},
d(detach) {
@ -230,7 +230,7 @@ function create_if_block_4(component, ctx) {
},
m(target, anchor) {
insertNode(p, target, anchor);
insert(target, p, anchor);
},
d(detach) {

@ -5,11 +5,11 @@ function assign(tar, src) {
return tar;
}
function appendNode(node, target) {
function append(target, node) {
target.appendChild(node);
}
function insertNode(node, target, anchor) {
function insert(target, node, anchor) {
target.insertBefore(node, anchor);
}
@ -175,9 +175,9 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
appendNode(text_1, p);
insert(target, p, anchor);
append(p, text);
append(p, text_1);
},
p(changed, ctx) {

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { appendNode, assign, createElement, createText, detachNode, init, insertNode, proto, setData } from "svelte/shared.js";
import { append, assign, createElement, createText, detachNode, init, insert, proto, setData } from "svelte/shared.js";
function create_main_fragment(component, ctx) {
var window_updating = false, clear_window_updating = function() { window_updating = false; }, window_updating_timeout, p, text, text_1;
@ -32,9 +32,9 @@ function create_main_fragment(component, ctx) {
},
m(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
appendNode(text_1, p);
insert(target, p, anchor);
append(p, text);
append(p, text_1);
},
p(changed, ctx) {

@ -1,12 +1,12 @@
export default {
data: {
name: 'world'
characters: ['a', 'b', 'c']
},
test ( assert, component, target ) {
assert.equal(
target.textContent,
`Hello world! How are you?`
`a b c `
);
}
};

@ -1 +1,3 @@
<h1>Hello <strong>{name}! </strong><span>How are you?</span></h1>
{#each characters as char}
<span>{char} </span>
{/each}

@ -0,0 +1,22 @@
export default {
data: {
// so it doesn't use innerHTML
one: 'one',
two: 'two',
three: 'three'
},
html: `
<ul>
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
`,
test(assert, component, target) {
const ul = target.querySelector('ul');
assert.equal(ul.childNodes.length, 5);
},
};

@ -0,0 +1,5 @@
<ul>
<li>{one}</li>
<li>{two}</li>
<li>{three}</li>
</ul>

@ -1,12 +1,12 @@
export default {
data: {
characters: ['a', 'b', 'c']
name: 'world'
},
test ( assert, component, target ) {
assert.equal(
target.textContent,
`a b c `
`Hello world! How are you?`
);
}
};

@ -1,3 +1 @@
{#each characters as char}
<span>{char} </span>
{/each}
<h1>Hello <strong>{name}! </strong><span>How are you?</span></h1>

Loading…
Cancel
Save