Skip to content

Commit d4d81e1

Browse files
committed
fix #153
1 parent 2b047c0 commit d4d81e1

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

src/html/Ast.zig

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ pub fn init(
758758
const name = tag.name.slice(src);
759759
const end_kind = if (svg_lvl == 1 and std.ascii.eqlIgnoreCase(name, "svg"))
760760
.svg
761-
else if (math_lvl == 1 and std.ascii.eqlIgnoreCase(name, "math"))
761+
else if (svg_lvl == 0 and math_lvl == 1 and std.ascii.eqlIgnoreCase(name, "math"))
762762
.math
763763
else if (svg_lvl != 0 or math_lvl != 0) .___ else switch (language) {
764764
.superhtml => if (std.ascii.eqlIgnoreCase("ctx", name))
@@ -825,11 +825,9 @@ pub fn init(
825825
if (same_name) {
826826
if (std.ascii.eqlIgnoreCase(current_name, "svg")) {
827827
svg_lvl -= 1;
828-
}
829-
if (std.ascii.eqlIgnoreCase(current_name, "math")) {
828+
} else if (std.ascii.eqlIgnoreCase(current_name, "math")) {
830829
math_lvl -= 1;
831-
}
832-
if (current.kind == .template) {
830+
} else if (current.kind == .template) {
833831
var map = seen_ids_stack.pop().?;
834832
map.deinit(gpa);
835833
}

src/html/elements/svg.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub const svg: Element = .{
1313
.meta = .{
1414
.categories_superset = .{
1515
.flow = true,
16-
.phrasing =true,
16+
.phrasing = true,
1717
},
1818
},
1919
.attributes = .manual, // we just don't do it

0 commit comments

Comments
 (0)