SemanticTree: cast with as

Co-authored-by: Karl Seguin <karlseguin@users.noreply.github.com>
This commit is contained in:
Adrià Arrufat
2026-03-11 16:33:39 +09:00
committed by GitHub
parent feccc9f5ce
commit 1866e7141e

View File

@@ -100,7 +100,7 @@ fn walk(self: @This(), node: *Node, xpath_buffer: *std.ArrayList(u8), parent_nam
if (html_el.getHidden()) return;
}
} else if (node.is(CData.Text) != null) {
const text_node = node.is(CData.Text).?;
const text_node = node.as(CData.Text);
const text = text_node.getWholeText();
if (isAllWhitespace(text)) {
return;