Add comment in filter_whitespace_nodes method

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2023-10-18 19:06:24 +02:00
parent 0aa24bdc32
commit 84784e2adb

View file

@ -92,6 +92,7 @@ impl PartialEq<Node> for ScanNode {
fn filter_whitespace_nodes(nodes: Vec<Node>) -> Vec<Node> { fn filter_whitespace_nodes(nodes: Vec<Node>) -> Vec<Node> {
// Tags with mixed significant text and children tags aren't valid in XMPP, so we know we // Tags with mixed significant text and children tags aren't valid in XMPP, so we know we
// can remove these before comparing. // can remove these before comparing.
// XXX: ^^^^^ This isn't true.
let filter_nodes = |(prev_type, mut acc): (Option<NodeType>, Vec<Node>), node| { let filter_nodes = |(prev_type, mut acc): (Option<NodeType>, Vec<Node>), node| {
let type_ = match node { let type_ = match node {
Node::Text(_) => NodeType::Text, Node::Text(_) => NodeType::Text,