Merge pull request #965 from sveltejs/gh-961

prevent boolean attributes breaking shapes inside estree-walker
pull/959/head
Rich Harris 7 years ago committed by GitHub
commit 3264b5160f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -72,15 +72,8 @@ function removeIndentation(
// We need to tell estree-walker that it should always
// look for an `else` block, otherwise it might get
// the wrong idea about the shape of each/if blocks
childKeys.EachBlock = [
'children',
'else'
];
childKeys.IfBlock = [
'children',
'else'
];
childKeys.EachBlock = childKeys.IfBlock = ['children', 'else'];
childKeys.Attribute = ['value'];
export default class Generator {
ast: Parsed;

@ -0,0 +1,3 @@
export default {
html: `<a href='/cool'>link</a>`
};

@ -0,0 +1,10 @@
<Link x href="/cool"/>
<script>
import Link from './Link.html';
export default {
components: {
Link
}
};
</script>
Loading…
Cancel
Save