Merge pull request #1327 from lightpanda-io/zigdom-cdata-length

Fix `dom/nodes/CharacterData-appendData` WPT
This commit is contained in:
Karl Seguin
2026-01-07 18:04:05 +08:00
committed by GitHub

View File

@@ -147,7 +147,7 @@ pub fn format(self: *const CData, writer: *std.io.Writer) !void {
} }
pub fn getLength(self: *const CData) usize { pub fn getLength(self: *const CData) usize {
return self._data.len; return std.unicode.utf8CountCodepoints(self._data) catch self._data.len;
} }
pub fn isEqualNode(self: *const CData, other: *const CData) bool { pub fn isEqualNode(self: *const CData, other: *const CData) bool {