mirror of https://github.com/sveltejs/svelte
Here the `error-each-blocks-empty` behaves as expected. It throws a ParseError. I can't get the whitespace errors to repro in the tests. They're easily seen here: https://svelte.technology/repl?version=1.51.0&gist=e1596f9631619a689e85c80e46506692 If you uncomment each section in sequence it demonstrates the behavior. I can't quite figure out why my examples don't work.pull/1156/head
parent
29a156957f
commit
c62f77a5d2
@ -0,0 +1,8 @@
|
||||
{
|
||||
"message": "comment was left open",
|
||||
"loc": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"pos": 0
|
||||
}
|
@ -0,0 +1 @@
|
||||
<!-- an unclosed comment
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
"message": "Empty block",
|
||||
"loc": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"pos": 0
|
||||
}
|
@ -0,0 +1 @@
|
||||
{{#each foos as foo}}{{/each}}
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
"message": "Empty block",
|
||||
"loc": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"pos": 0
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
{{#each foos as foo @id}}
|
||||
{{/each}}
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data: () => ({ foos: [] })
|
||||
}
|
||||
</script>
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
"message": "Empty block",
|
||||
"loc": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"pos": 0
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
{{#each foos as foo}}
|
||||
{{/each}}
|
Loading…
Reference in new issue