refactor: improve gateway parsing

This commit is contained in:
Kevin Yue
2024-07-07 13:38:34 +00:00
parent 68227b64a2
commit 370a32f1b5
2 changed files with 12 additions and 6 deletions

View File

@@ -7,7 +7,7 @@ pub(crate) trait NodeExt<'a> {
impl<'a> NodeExt<'a> for Node<'a, 'a> {
fn find_child(&self, name: &str) -> Option<Node<'a, 'a>> {
self.children().find(|n| n.has_tag_name(name))
self.descendants().find(|n| n.has_tag_name(name))
}
fn child_text(&self, name: &str) -> Option<&'a str> {