sanitize element names in preprocess step

pull/512/head
Rich-Harris 8 years ago
parent 11cf3f94f0
commit 4fe20fb383

@ -174,7 +174,7 @@ const preprocessors = {
if ( isComponent ) { if ( isComponent ) {
node._state = getChildState( state ); node._state = getChildState( state );
} else { } else {
const name = block.getUniqueName( node.name ); const name = block.getUniqueName( node.name.replace( /[^a-zA-Z0-9_$]/g, '_' ) );
node._state = getChildState( state, { node._state = getChildState( state, {
isTopLevel: false, isTopLevel: false,

Loading…
Cancel
Save