We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
@
1 parent 943c048 commit 2d9041fCopy full SHA for 2d9041f
src/compiler/compile/render_dom/Block.ts
@@ -2,6 +2,7 @@ import CodeBuilder from '../utils/CodeBuilder';
2
import deindent from '../utils/deindent';
3
import Renderer from './Renderer';
4
import Wrapper from './wrappers/shared/Wrapper';
5
+import { escape } from '../utils/stringify';
6
7
export interface BlockOptions {
8
parent?: Block;
@@ -408,7 +409,7 @@ export default class Block {
408
409
const local_key = this.key && this.get_unique_name('key');
410
411
return deindent`
- ${this.comment && `// ${this.comment}`}
412
+ ${this.comment && `// ${escape(this.comment, { only_escape_at_symbol: true })}`}
413
function ${this.name}(${this.key ? `${local_key}, ` : ''}ctx) {
414
${this.get_contents(local_key)}
415
}
0 commit comments