fix: disable `@html` in custom renderer

pull/18058/head
paoloricciuti 5 months ago
parent 9ccd0b4e08
commit 020dc9e1bb

@ -2,12 +2,16 @@
/** @import { Context } from '../types' */
import { mark_subtree_dynamic } from './shared/fragment.js';
import { validate_opening_tag } from './shared/utils.js';
import * as e from '../../../errors.js';
/**
* @param {AST.HtmlTag} node
* @param {Context} context
*/
export function HtmlTag(node, context) {
if (context.state.analysis.custom_renderer) {
e.incompatible_with_custom_renderer(node, '`@html`');
}
if (context.state.analysis.runes) {
validate_opening_tag(node, context.state, '@');
}

@ -0,0 +1,5 @@
import { test } from '../../test';
export default test({
compile_error: '`@html` is not compatible with `customRenderer`'
});
Loading…
Cancel
Save