Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/all-bobcats-return.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@marko/runtime-tags": patch
---

Fix circular issue when serializing functions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,36 +35,36 @@
</div>
<script>
WALKER_RUNTIME("M")("_");
M._.r = [_ =&gt; (_.c = [0, 2, _.a = {
"ConditionalScope:#text/1": _.b = {
M._.r = [_ =&gt; (_.b = [0, 2, _.c = {
"ConditionalScope:#text/1": _.a = {
"#BranchAccessor": "#text/1"
}
}, _.b], _.b["#PlaceholderContent"] = _._[
}, _.a], _.a["#PlaceholderContent"] = _._[
"__tests__/tags/recurse.marko_4_content"
](_.a), _.c), _ =&gt; (_.f = [2, _.d = {
"ConditionalScope:#text/1": _.e = {
](_.c), _.b), _ =&gt; (_.e = [2, _.f = {
"ConditionalScope:#text/1": _.d = {
"#BranchAccessor": "#text/1"
}
}, _.e], _.e["#PlaceholderContent"] = _._[
}, _.d], _.d["#PlaceholderContent"] = _._[
"__tests__/tags/recurse.marko_4_content"
](_.d), _.f)];
](_.f), _.e)];
REORDER_RUNTIME(M._);
M._.w()
</script>
<script>
M._.r.push(_ =&gt; (_.i = [3, _.g = {
"ConditionalScope:#text/1": _.h = {
M._.r.push(_ =&gt; (_.h = [3, _.i = {
"ConditionalScope:#text/1": _.g = {
"#BranchAccessor": "#text/1"
}
}, _.h], _.h["#PlaceholderContent"] = _._[
}, _.g], _.g["#PlaceholderContent"] = _._[
"__tests__/tags/recurse.marko_4_content"
](_.g), _.i), _ =&gt; (_.l = [2, _.j = {
"ConditionalScope:#text/1": _.k = {
](_.i), _.h), _ =&gt; (_.k = [2, _.l = {
"ConditionalScope:#text/1": _.j = {
"#BranchAccessor": "#text/1"
}
}, _.k], _.k["#PlaceholderContent"] = _._[
}, _.j], _.j["#PlaceholderContent"] = _._[
"__tests__/tags/recurse.marko_4_content"
](_.j), _.l));
](_.l), _.k));
M._.w()
</script>
<script>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Write
```html
<div data-level=4><!--M_[--><div data-level=3><!--M_[--><!--M_!^b-->LOADING...<!--M_!b--><!--M_]7 #text/1 8--></div><!--M_]3 #text/1 4--></div><style M_>t{display:none}</style><t M_=b><!--M_#c--></t><script>WALKER_RUNTIME("M")("_");M._.r=[_=>(_.c=[0,2,_.a={"ConditionalScope:#text/1":_.b={"#BranchAccessor":"#text/1"}},_.b],_.b["#PlaceholderContent"]=_._["__tests__/tags/recurse.marko_4_content"](_.a),_.c),_=>(_.f=[2,_.d={"ConditionalScope:#text/1":_.e={"#BranchAccessor":"#text/1"}},_.e],_.e["#PlaceholderContent"]=_._["__tests__/tags/recurse.marko_4_content"](_.d),_.f)];REORDER_RUNTIME(M._);M._.w()</script>
<div data-level=4><!--M_[--><div data-level=3><!--M_[--><!--M_!^b-->LOADING...<!--M_!b--><!--M_]7 #text/1 8--></div><!--M_]3 #text/1 4--></div><style M_>t{display:none}</style><t M_=b><!--M_#c--></t><script>WALKER_RUNTIME("M")("_");M._.r=[_=>(_.b=[0,2,_.c={"ConditionalScope:#text/1":_.a={"#BranchAccessor":"#text/1"}},_.a],_.a["#PlaceholderContent"]=_._["__tests__/tags/recurse.marko_4_content"](_.c),_.b),_=>(_.e=[2,_.f={"ConditionalScope:#text/1":_.d={"#BranchAccessor":"#text/1"}},_.d],_.d["#PlaceholderContent"]=_._["__tests__/tags/recurse.marko_4_content"](_.f),_.e)];REORDER_RUNTIME(M._);M._.w()</script>
```

# Write
```html
<t M_=c><div data-level=2><!--M_[--><div data-level=1><!--M_[--><!--M_!^d-->LOADING...<!--M_!d--><!--M_]16 #text/1 17--></div><!--M_]12 #text/1 13--></div></t><t M_=d><!--M_#e--></t><script>M._.r.push(_=>(_.i=[3,_.g={"ConditionalScope:#text/1":_.h={"#BranchAccessor":"#text/1"}},_.h],_.h["#PlaceholderContent"]=_._["__tests__/tags/recurse.marko_4_content"](_.g),_.i),_=>(_.l=[2,_.j={"ConditionalScope:#text/1":_.k={"#BranchAccessor":"#text/1"}},_.k],_.k["#PlaceholderContent"]=_._["__tests__/tags/recurse.marko_4_content"](_.j),_.l));M._.w()</script>
<t M_=c><div data-level=2><!--M_[--><div data-level=1><!--M_[--><!--M_!^d-->LOADING...<!--M_!d--><!--M_]16 #text/1 17--></div><!--M_]12 #text/1 13--></div></t><t M_=d><!--M_#e--></t><script>M._.r.push(_=>(_.h=[3,_.i={"ConditionalScope:#text/1":_.g={"#BranchAccessor":"#text/1"}},_.g],_.g["#PlaceholderContent"]=_._["__tests__/tags/recurse.marko_4_content"](_.i),_.h),_=>(_.k=[2,_.l={"ConditionalScope:#text/1":_.j={"#BranchAccessor":"#text/1"}},_.j],_.j["#PlaceholderContent"]=_._["__tests__/tags/recurse.marko_4_content"](_.l),_.k));M._.w()</script>
```

# Write
Expand Down Expand Up @@ -50,36 +50,36 @@
</div>
<script>
WALKER_RUNTIME("M")("_");
M._.r = [_ =&gt; (_.c = [0, 2, _.a = {
"ConditionalScope:#text/1": _.b = {
M._.r = [_ =&gt; (_.b = [0, 2, _.c = {
"ConditionalScope:#text/1": _.a = {
"#BranchAccessor": "#text/1"
}
}, _.b], _.b["#PlaceholderContent"] = _._[
}, _.a], _.a["#PlaceholderContent"] = _._[
"__tests__/tags/recurse.marko_4_content"
](_.a), _.c), _ =&gt; (_.f = [2, _.d = {
"ConditionalScope:#text/1": _.e = {
](_.c), _.b), _ =&gt; (_.e = [2, _.f = {
"ConditionalScope:#text/1": _.d = {
"#BranchAccessor": "#text/1"
}
}, _.e], _.e["#PlaceholderContent"] = _._[
}, _.d], _.d["#PlaceholderContent"] = _._[
"__tests__/tags/recurse.marko_4_content"
](_.d), _.f)];
](_.f), _.e)];
REORDER_RUNTIME(M._);
M._.w()
</script>
<script>
M._.r.push(_ =&gt; (_.i = [3, _.g = {
"ConditionalScope:#text/1": _.h = {
M._.r.push(_ =&gt; (_.h = [3, _.i = {
"ConditionalScope:#text/1": _.g = {
"#BranchAccessor": "#text/1"
}
}, _.h], _.h["#PlaceholderContent"] = _._[
}, _.g], _.g["#PlaceholderContent"] = _._[
"__tests__/tags/recurse.marko_4_content"
](_.g), _.i), _ =&gt; (_.l = [2, _.j = {
"ConditionalScope:#text/1": _.k = {
](_.i), _.h), _ =&gt; (_.k = [2, _.l = {
"ConditionalScope:#text/1": _.j = {
"#BranchAccessor": "#text/1"
}
}, _.k], _.k["#PlaceholderContent"] = _._[
}, _.j], _.j["#PlaceholderContent"] = _._[
"__tests__/tags/recurse.marko_4_content"
](_.j), _.l));
](_.l), _.k));
M._.w()
</script>
<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@
<head>
<script>
WALKER_RUNTIME("M")("_");
M._.r = [_ =&gt; (_.e = [0, _.a = {
"ConditionalScope:#text/0": _.b = {
M._.r = [_ =&gt; (_.d = [0, _.e = {
"ConditionalScope:#text/0": _.a = {
"#BranchAccessor": "#text/0"
},
"ConditionalScope:#text/1": _.c = {
"ConditionalScope:#text/1": _.b = {
"#BranchAccessor": "#text/1"
},
"ConditionalScope:#text/2": _.d = {
"ConditionalScope:#text/2": _.c = {
"#BranchAccessor": "#text/2"
}
}, _.b, _.c, _.d], _.b["#CatchContent"] = _._[
}, _.a, _.b, _.c], _.a["#CatchContent"] = _._[
"__tests__/template.marko_2_content"
](_.a), _.c["#CatchContent"] = _._[
](_.e), _.b["#CatchContent"] = _._[
"__tests__/template.marko_5_content"
](_.a), _.d["#CatchContent"] = _._[
](_.e), _.c["#CatchContent"] = _._[
"__tests__/template.marko_8_content"
](_.a), _.e)]
](_.e), _.d)]
</script>
<style
m_=""
Expand Down Expand Up @@ -57,7 +57,7 @@
<!--M_!d-->
<!--M_]1 #text/2 4-->
<script>
M._.r.push(_ =&gt; (_.f = [2, _.g = {}], _.d["ConditionalScope:#text/0"] = _
M._.r.push(_ =&gt; (_.f = [2, _.g = {}], _.c["ConditionalScope:#text/0"] = _
.g, _.f),
"__tests__/template.marko_9",
7);
Expand Down Expand Up @@ -87,23 +87,23 @@ container.querySelector("button").click();
<head>
<script>
WALKER_RUNTIME("M")("_");
M._.r = [_ =&gt; (_.e = [0, _.a = {
"ConditionalScope:#text/0": _.b = {
M._.r = [_ =&gt; (_.d = [0, _.e = {
"ConditionalScope:#text/0": _.a = {
"#BranchAccessor": "#text/0"
},
"ConditionalScope:#text/1": _.c = {
"ConditionalScope:#text/1": _.b = {
"#BranchAccessor": "#text/1"
},
"ConditionalScope:#text/2": _.d = {
"ConditionalScope:#text/2": _.c = {
"#BranchAccessor": "#text/2"
}
}, _.b, _.c, _.d], _.b["#CatchContent"] = _._[
}, _.a, _.b, _.c], _.a["#CatchContent"] = _._[
"__tests__/template.marko_2_content"
](_.a), _.c["#CatchContent"] = _._[
](_.e), _.b["#CatchContent"] = _._[
"__tests__/template.marko_5_content"
](_.a), _.d["#CatchContent"] = _._[
](_.e), _.c["#CatchContent"] = _._[
"__tests__/template.marko_8_content"
](_.a), _.e)]
](_.e), _.d)]
</script>
<style
m_=""
Expand Down Expand Up @@ -139,7 +139,7 @@ container.querySelector("button").click();
<!--M_!d-->
<!--M_]1 #text/2 4-->
<script>
M._.r.push(_ =&gt; (_.f = [2, _.g = {}], _.d["ConditionalScope:#text/0"] = _
M._.r.push(_ =&gt; (_.f = [2, _.g = {}], _.c["ConditionalScope:#text/0"] = _
.g, _.f),
"__tests__/template.marko_9",
7);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Write
```html
<!--M_[--><!--M_!^b--><script>WALKER_RUNTIME("M")("_");M._.r=[_=>(_.e=[0,_.a={"ConditionalScope:#text/0":_.b={"#BranchAccessor":"#text/0"},"ConditionalScope:#text/1":_.c={"#BranchAccessor":"#text/1"},"ConditionalScope:#text/2":_.d={"#BranchAccessor":"#text/2"}},_.b,_.c,_.d],_.b["#CatchContent"]=_._["__tests__/template.marko_2_content"](_.a),_.c["#CatchContent"]=_._["__tests__/template.marko_5_content"](_.a),_.d["#CatchContent"]=_._["__tests__/template.marko_8_content"](_.a),_.e)]</script>
<!--M_[--><!--M_!^b--><script>WALKER_RUNTIME("M")("_");M._.r=[_=>(_.d=[0,_.e={"ConditionalScope:#text/0":_.a={"#BranchAccessor":"#text/0"},"ConditionalScope:#text/1":_.b={"#BranchAccessor":"#text/1"},"ConditionalScope:#text/2":_.c={"#BranchAccessor":"#text/2"}},_.a,_.b,_.c],_.a["#CatchContent"]=_._["__tests__/template.marko_2_content"](_.e),_.b["#CatchContent"]=_._["__tests__/template.marko_5_content"](_.e),_.c["#CatchContent"]=_._["__tests__/template.marko_8_content"](_.e),_.d)]</script>
```

# Write
Expand All @@ -10,7 +10,7 @@

# Write
```html
<div>Resolved A: A Value</div><!--M_!b--><!--M_]1 #text/0 2--><!--M_[--><!--M_!^c--><!--M_!c--><!--M_]1 #text/1 3--><!--M_[--><!--M_!^d--><!--M_[--><div>Resolved C: C Value</div><button>Before</button><!--M_*7 #button/1--><!--M_]4 #text/0 7--><!--M_!d--><!--M_]1 #text/2 4--><script>M._.r.push(_=>(_.f=[2,_.g={}],_.d["ConditionalScope:#text/0"]=_.g,_.f),"__tests__/template.marko_9",7);M._.w()</script>
<div>Resolved A: A Value</div><!--M_!b--><!--M_]1 #text/0 2--><!--M_[--><!--M_!^c--><!--M_!c--><!--M_]1 #text/1 3--><!--M_[--><!--M_!^d--><!--M_[--><div>Resolved C: C Value</div><button>Before</button><!--M_*7 #button/1--><!--M_]4 #text/0 7--><!--M_!d--><!--M_]1 #text/2 4--><script>M._.r.push(_=>(_.f=[2,_.g={}],_.c["ConditionalScope:#text/0"]=_.g,_.f),"__tests__/template.marko_9",7);M._.w()</script>
```

# Render End
Expand All @@ -21,23 +21,23 @@
<head>
<script>
WALKER_RUNTIME("M")("_");
M._.r = [_ =&gt; (_.e = [0, _.a = {
"ConditionalScope:#text/0": _.b = {
M._.r = [_ =&gt; (_.d = [0, _.e = {
"ConditionalScope:#text/0": _.a = {
"#BranchAccessor": "#text/0"
},
"ConditionalScope:#text/1": _.c = {
"ConditionalScope:#text/1": _.b = {
"#BranchAccessor": "#text/1"
},
"ConditionalScope:#text/2": _.d = {
"ConditionalScope:#text/2": _.c = {
"#BranchAccessor": "#text/2"
}
}, _.b, _.c, _.d], _.b["#CatchContent"] = _._[
}, _.a, _.b, _.c], _.a["#CatchContent"] = _._[
"__tests__/template.marko_2_content"
](_.a), _.c["#CatchContent"] = _._[
](_.e), _.b["#CatchContent"] = _._[
"__tests__/template.marko_5_content"
](_.a), _.d["#CatchContent"] = _._[
](_.e), _.c["#CatchContent"] = _._[
"__tests__/template.marko_8_content"
](_.a), _.e)]
](_.e), _.d)]
</script>
<style
m_=""
Expand Down Expand Up @@ -72,7 +72,7 @@
<!--M_!d-->
<!--M_]1 #text/2 4-->
<script>
M._.r.push(_ =&gt; (_.f = [2, _.g = {}], _.d["ConditionalScope:#text/0"] = _
M._.r.push(_ =&gt; (_.f = [2, _.g = {}], _.c["ConditionalScope:#text/0"] = _
.g, _.f),
"__tests__/template.marko_9",
7);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
<head>
<script>
WALKER_RUNTIME("M")("_");
M._.r = [_ =&gt; (_.d = [0, _.a = {
"ConditionalScope:#text/0": _.b = {
M._.r = [_ =&gt; (_.c = [0, _.d = {
"ConditionalScope:#text/0": _.a = {
"#BranchAccessor": "#text/0"
},
"ConditionalScope:#text/1": _.c = {
"ConditionalScope:#text/1": _.b = {
"#BranchAccessor": "#text/1"
}
}, _.b, _.c], _.b["#CatchContent"] = _._[
}, _.a, _.b], _.a["#CatchContent"] = _._[
"__tests__/template.marko_2_content"
](_.a), _.c["#CatchContent"] = _._[
](_.d), _.b["#CatchContent"] = _._[
"__tests__/template.marko_5_content"
](_.a), _.d)]
](_.d), _.c)]
</script>
<style
m_=""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Write
```html
<!--M_[--><!--M_!^b--><script>WALKER_RUNTIME("M")("_");M._.r=[_=>(_.d=[0,_.a={"ConditionalScope:#text/0":_.b={"#BranchAccessor":"#text/0"},"ConditionalScope:#text/1":_.c={"#BranchAccessor":"#text/1"}},_.b,_.c],_.b["#CatchContent"]=_._["__tests__/template.marko_2_content"](_.a),_.c["#CatchContent"]=_._["__tests__/template.marko_5_content"](_.a),_.d)]</script>
<!--M_[--><!--M_!^b--><script>WALKER_RUNTIME("M")("_");M._.r=[_=>(_.c=[0,_.d={"ConditionalScope:#text/0":_.a={"#BranchAccessor":"#text/0"},"ConditionalScope:#text/1":_.b={"#BranchAccessor":"#text/1"}},_.a,_.b],_.a["#CatchContent"]=_._["__tests__/template.marko_2_content"](_.d),_.b["#CatchContent"]=_._["__tests__/template.marko_5_content"](_.d),_.c)]</script>
```

# Write
Expand All @@ -21,18 +21,18 @@
<head>
<script>
WALKER_RUNTIME("M")("_");
M._.r = [_ =&gt; (_.d = [0, _.a = {
"ConditionalScope:#text/0": _.b = {
M._.r = [_ =&gt; (_.c = [0, _.d = {
"ConditionalScope:#text/0": _.a = {
"#BranchAccessor": "#text/0"
},
"ConditionalScope:#text/1": _.c = {
"ConditionalScope:#text/1": _.b = {
"#BranchAccessor": "#text/1"
}
}, _.b, _.c], _.b["#CatchContent"] = _._[
}, _.a, _.b], _.a["#CatchContent"] = _._[
"__tests__/template.marko_2_content"
](_.a), _.c["#CatchContent"] = _._[
](_.d), _.b["#CatchContent"] = _._[
"__tests__/template.marko_5_content"
](_.a), _.d)]
](_.d), _.c)]
</script>
<style
m_=""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,40 +38,40 @@
<!--M_]1 #text/0 2-->
<script>
WALKER_RUNTIME("M")("_");
M._.r = [_ =&gt; (_.c = [0, _.a = {
"ConditionalScope:#text/0": _.b = {
M._.r = [_ =&gt; (_.b = [0, _.c = {
"ConditionalScope:#text/0": _.a = {
"#BranchAccessor": "#text/0"
}
}, _.b], _.b["#PlaceholderContent"] = _._[
}, _.a], _.a["#PlaceholderContent"] = _._[
"__tests__/template.marko_4_content"
](_.a), _.c)];
](_.c), _.b)];
REORDER_RUNTIME(M._);
M._.w()
</script>
<script>
M._.r.push(_ =&gt; (_.f = [1, _.d = {
"ConditionalScope:#text/1": _.e = {
M._.r.push(_ =&gt; (_.e = [1, _.f = {
"ConditionalScope:#text/1": _.d = {
"#BranchAccessor": "#text/1"
}
}, _.e], _.e["#PlaceholderContent"] = _._[
}, _.d], _.d["#PlaceholderContent"] = _._[
"__tests__/template.marko_5_content"
](_.d), _.f), _ =&gt; (_.i = [_.g = {
"ConditionalScope:#text/1": _.h = {
](_.f), _.e), _ =&gt; (_.h = [_.i = {
"ConditionalScope:#text/1": _.g = {
"#BranchAccessor": "#text/1"
}
}, _.h], _.h["#PlaceholderContent"] = _._[
}, _.g], _.g["#PlaceholderContent"] = _._[
"__tests__/template.marko_10_content"
](_.g), _.i));
](_.i), _.h));
M._.w()
</script>
<script>
M._.r.push(_ =&gt; (_.l = [1, _.j = {
"ConditionalScope:#text/1": _.k = {
M._.r.push(_ =&gt; (_.k = [1, _.l = {
"ConditionalScope:#text/1": _.j = {
"#BranchAccessor": "#text/1"
}
}, _.k], _.k["#PlaceholderContent"] = _._[
}, _.j], _.j["#PlaceholderContent"] = _._[
"__tests__/template.marko_11_content"
](_.j), _.l));
](_.l), _.k));
M._.w()
</script>
</body>
Expand Down
Loading