svelte
Version:
Cybernetically enhanced web apps
12 lines (10 loc) • 368 B
JavaScript
/** @import { AST } from '#compiler' */
/** @import { ComponentContext } from '../types' */
/**
* @param {AST.Comment} node
* @param {ComponentContext} context
*/
export function Comment(node, context) {
// We'll only get here if comments are not filtered out, which they are unless preserveComments is true
context.state.template.push(`<!--${node.data}-->`);
}