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 { Context } from '../types' */
import { mark_subtree_dynamic } from './shared/fragment.js'; import { mark_subtree_dynamic } from './shared/fragment.js';
import { validate_opening_tag } from './shared/utils.js'; import { validate_opening_tag } from './shared/utils.js';
import * as e from '../../../errors.js';
/** /**
* @param {AST.HtmlTag} node * @param {AST.HtmlTag} node
* @param {Context} context * @param {Context} context
*/ */
export function HtmlTag(node, context) { export function HtmlTag(node, context) {
if (context.state.analysis.custom_renderer) {
e.incompatible_with_custom_renderer(node, '`@html`');
}
if (context.state.analysis.runes) { if (context.state.analysis.runes) {
validate_opening_tag(node, context.state, '@'); 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