Merge pull request #1670 from lightpanda-io/cdata_sso

Change CData._data from []const to String (SSO)
This commit is contained in:
Karl Seguin
2026-02-27 17:30:03 +08:00
committed by GitHub
12 changed files with 254 additions and 100 deletions

View File

@@ -307,7 +307,11 @@ pub const Writer = struct {
try w.write(dom_node.getNodeName(&name_buf));
try w.objectField("nodeValue");
try w.write(dom_node.getNodeValue() orelse "");
if (dom_node.getNodeValue()) |nv| {
try w.write(nv.str());
} else {
try w.write("");
}
if (include_child_count) {
try w.objectField("childNodeCount");