Commit 940db5b4 authored by Robert Knight's avatar Robert Knight

Add space before `/>` in self-closing tag

This matches how Prettier formats self-closing JSX tags and makes
expressions such as `<Widget expanded />` more readable.
parent 610cc5eb
...@@ -85,7 +85,7 @@ export function jsxToString(vnode) { ...@@ -85,7 +85,7 @@ export function jsxToString(vnode) {
return `<${name}${propStr}>\n${childrenStr}\n</${name}>`; return `<${name}${propStr}>\n${childrenStr}\n</${name}>`;
} else { } else {
// No children - use a self-closing tag. // No children - use a self-closing tag.
return `<${name}${propStr}/>`; return `<${name}${propStr} />`;
} }
} else { } else {
return ''; return '';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment