From 6bdc20bc5306ae3b53947a7c868a88408b0f6f2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Thu, 12 Jan 2023 21:02:48 +0100 Subject: [PATCH] Provide scansion namespace for minidom::Element MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It went undetected until now as these attributes only seem to be on child elements which aren't parsed yet. Not having this NS available should cause issues though when the user explores the element. Signed-off-by: Maxime “pep” Buquet --- src/lib.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 3704eba..2dff3e8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,7 +4,7 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. -use std::collections::HashMap; +use std::collections::{BTreeMap, HashMap}; use std::str::FromStr; use jid::Jid; @@ -41,6 +41,7 @@ impl<'a> From>>> for Token<'a> { } pub static DEFAULT_NS: &'static str = "jabber:client"; +pub static SCANSION_NS: &'static str = "https://matthewwild.co.uk/projects/scansion"; pub type AccountName = String; @@ -247,9 +248,12 @@ fn parse_send_receive<'a>(tagname: &str, name: String, s: Span<'a>) -> IResult (s, Action::Send(name, elem)), "receives:" => (s, Action::Receive(name, elem)),