mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-16 08:18:59 +00:00
use a better comparison to detect comment
This commit is contained in:
@@ -175,12 +175,8 @@ pub fn getTextContent(self: *Node, writer: *std.Io.Writer) error{WriteFailed}!vo
|
|||||||
var it = self.childrenIterator();
|
var it = self.childrenIterator();
|
||||||
while (it.next()) |child| {
|
while (it.next()) |child| {
|
||||||
// ignore comments and TODO processing instructions.
|
// ignore comments and TODO processing instructions.
|
||||||
switch (child._type) {
|
if (child.is(CData.Comment) != null) {
|
||||||
.cdata => |c| switch (c._type) {
|
continue;
|
||||||
.comment => continue,
|
|
||||||
.text => {},
|
|
||||||
},
|
|
||||||
else => {},
|
|
||||||
}
|
}
|
||||||
try child.getTextContent(writer);
|
try child.getTextContent(writer);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user