|
|
@ -423,17 +423,17 @@ export default class Block {
|
|
|
|
const key = this.key && this.get_unique_name('key');
|
|
|
|
const key = this.key && this.get_unique_name('key');
|
|
|
|
|
|
|
|
|
|
|
|
const args: any[] = [x`#ctx`];
|
|
|
|
const args: any[] = [x`#ctx`];
|
|
|
|
|
|
|
|
|
|
|
|
if (key) args.unshift(key);
|
|
|
|
if (key) args.unshift(key);
|
|
|
|
|
|
|
|
|
|
|
|
// TODO include this.comment
|
|
|
|
const fn = b`function ${this.name}(${args}) {
|
|
|
|
// ${this.comment && `// ${escape(this.comment, { only_escape_at_symbol: true })}`}
|
|
|
|
${this.get_contents(key)}
|
|
|
|
|
|
|
|
}`;
|
|
|
|
|
|
|
|
|
|
|
|
return b`
|
|
|
|
return this.comment
|
|
|
|
function ${this.name}(${args}) {
|
|
|
|
? b`
|
|
|
|
${this.get_contents(key)}
|
|
|
|
// ${this.comment}
|
|
|
|
}
|
|
|
|
${fn}`
|
|
|
|
`;
|
|
|
|
: fn;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
render_listeners(chunk: string = '') {
|
|
|
|
render_listeners(chunk: string = '') {
|
|
|
|