diff --git a/src/compiler/compile/render_dom/Block.ts b/src/compiler/compile/render_dom/Block.ts index 4f6a51e12014..71082cea71ff 100644 --- a/src/compiler/compile/render_dom/Block.ts +++ b/src/compiler/compile/render_dom/Block.ts @@ -2,7 +2,7 @@ import CodeBuilder from '../utils/CodeBuilder'; import deindent from '../utils/deindent'; import Renderer from './Renderer'; import Wrapper from './wrappers/shared/Wrapper'; -import { escape } from '../utils/stringify'; +import { stringify, escape } from '../utils/stringify'; export interface BlockOptions { parent?: Block; @@ -378,7 +378,7 @@ export default class Block { const block = { ${properties} }; - @dispatch_dev("SvelteRegisterBlock", { block, id: ${this.name || 'create_fragment'}.name, type: "${this.type}", source: "${this.comment ? this.comment.replace(/"/g, '\\"') : ''}", ctx }); + @dispatch_dev("SvelteRegisterBlock", { block, id: ${this.name || 'create_fragment'}.name, type: "${this.type}", source: ${stringify(this.comment || '', { only_escape_at_symbol: true })}, ctx }); return block;` : deindent` return { diff --git a/test/runtime/samples/sigil-component-attribute/Widget.svelte b/test/runtime/samples/sigil-component-prop/Widget.svelte similarity index 100% rename from test/runtime/samples/sigil-component-attribute/Widget.svelte rename to test/runtime/samples/sigil-component-prop/Widget.svelte diff --git a/test/runtime/samples/sigil-component-attribute/_config.js b/test/runtime/samples/sigil-component-prop/_config.js similarity index 69% rename from test/runtime/samples/sigil-component-attribute/_config.js rename to test/runtime/samples/sigil-component-prop/_config.js index 066505cfa474..2f467bb9d4dd 100644 --- a/test/runtime/samples/sigil-component-attribute/_config.js +++ b/test/runtime/samples/sigil-component-prop/_config.js @@ -1,4 +1,7 @@ export default { + compileOptions: { + dev: true + }, props: { foo: 'foo' }, html: `