|
|
@ -12,7 +12,7 @@ export default class Text extends Node {
|
|
|
|
super(component, parent, scope, info);
|
|
|
|
super(component, parent, scope, info);
|
|
|
|
this.data = info.data;
|
|
|
|
this.data = info.data;
|
|
|
|
|
|
|
|
|
|
|
|
if (!component.component_options.preserveWhitespace) {
|
|
|
|
if (!component.component_options.preserveWhitespace && !/[\S\u00A0]/.test(info.data)) {
|
|
|
|
let node = parent;
|
|
|
|
let node = parent;
|
|
|
|
while (node) {
|
|
|
|
while (node) {
|
|
|
|
if (node.type === 'Element' && node.name === 'pre') {
|
|
|
|
if (node.type === 'Element' && node.name === 'pre') {
|
|
|
@ -21,7 +21,7 @@ export default class Text extends Node {
|
|
|
|
node = node.parent;
|
|
|
|
node = node.parent;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.use_space = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|