mirror of https://github.com/sveltejs/svelte
parent
e7d324f305
commit
b8705a5b0c
@ -1,3 +1,3 @@
|
||||
export default {
|
||||
export default function visitComment () {
|
||||
// do nothing
|
||||
};
|
||||
}
|
||||
|
@ -1,10 +1,8 @@
|
||||
export default {
|
||||
enter ( generator, node ) {
|
||||
export default function visitText ( generator, node ) {
|
||||
if ( generator.current.namespace && !/\S/.test( node.data ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
const name = generator.current.getUniqueName( `text` );
|
||||
generator.addElement( name, `${generator.helper( 'createText' )}( ${JSON.stringify( node.data )} )`, false );
|
||||
}
|
||||
};
|
||||
}
|
Loading…
Reference in new issue