Skip to content

Commit 93d7afe

Browse files
committed
syntax only: don't report unknown elements as errors
this was a bug, syntax only is not supposed to validate element names, mainly because it's meant to be a compatibility mode for templating engines that might have custom elements defined.
1 parent 336c00b commit 93d7afe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/html/Ast.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ pub fn init(
627627
.model = model,
628628
.self_closing = self_closing,
629629
};
630-
} else if (std.mem.indexOfScalar(u8, name, '-') == null) {
630+
} else if (std.mem.indexOfScalar(u8, name, '-') == null and !syntax_only) {
631631
try errors.append(gpa, .{
632632
.tag = .invalid_html_tag_name,
633633
.main_location = tag.name,

0 commit comments

Comments
 (0)