diff --git a/src/compiler/compile/nodes/Text.ts b/src/compiler/compile/nodes/Text.ts index 7500f5ff30d9..a4514f56f26e 100644 --- a/src/compiler/compile/nodes/Text.ts +++ b/src/compiler/compile/nodes/Text.ts @@ -12,7 +12,7 @@ export default class Text extends Node { super(component, parent, scope, info); this.data = info.data; - if (!component.component_options.preserveWhitespace && !/\S/.test(info.data)) { + if (!component.component_options.preserveWhitespace && !/[\S\u00A0]/.test(info.data)) { let node = parent; while (node) { if (node.type === 'Element' && node.name === 'pre') {