mirror of https://github.com/sveltejs/svelte
parent
a236794763
commit
f21c3b7136
@ -1,4 +1,4 @@
|
||||
import { snip } from '../../../utils/snip';
|
||||
import { snip } from '../../utils/snip';
|
||||
|
||||
export default function(node, renderer, options) {
|
||||
renderer.append('${' + snip(node.expression) + '}');
|
||||
|
@ -1,13 +1,13 @@
|
||||
import Attribute from '../compile/nodes/Attribute';
|
||||
import Node from '../compile/nodes/shared/Node';
|
||||
import { escapeTemplate, escape } from './stringify';
|
||||
import Attribute from '../nodes/Attribute';
|
||||
import Node from '../nodes/shared/Node';
|
||||
import { escape_template, escape } from './stringify';
|
||||
import { snip } from './snip';
|
||||
|
||||
export function stringify_attribute(attribute: Attribute, is_ssr: boolean) {
|
||||
return attribute.chunks
|
||||
.map((chunk: Node) => {
|
||||
if (chunk.type === 'Text') {
|
||||
return escapeTemplate(escape(chunk.data).replace(/"/g, '"'));
|
||||
return escape_template(escape(chunk.data).replace(/"/g, '"'));
|
||||
}
|
||||
|
||||
return is_ssr
|
Loading…
Reference in new issue