aboutsummaryrefslogtreecommitdiffstats
path: root/src/xml
diff options
context:
space:
mode:
Diffstat (limited to 'src/xml')
-rw-r--r--src/xml/composers.rs4
-rw-r--r--src/xml/mod.rs4
-rw-r--r--src/xml/parsers.rs4
-rw-r--r--src/xml/parsers_complete.rs11
4 files changed, 22 insertions, 1 deletions
diff --git a/src/xml/composers.rs b/src/xml/composers.rs
index a47f007..160811f 100644
--- a/src/xml/composers.rs
+++ b/src/xml/composers.rs
@@ -1,3 +1,7 @@
+// SPDX-FileCopyrightText: 2025 cel <cel@bunny.garden>
+//
+// SPDX-License-Identifier: AGPL-3.0-or-later
+
use std::{
fmt::{self, Display, Formatter, Write},
io,
diff --git a/src/xml/mod.rs b/src/xml/mod.rs
index 005a122..2bf960e 100644
--- a/src/xml/mod.rs
+++ b/src/xml/mod.rs
@@ -1,3 +1,7 @@
+// SPDX-FileCopyrightText: 2025 cel <cel@bunny.garden>
+//
+// SPDX-License-Identifier: AGPL-3.0-or-later
+
use std::{char, ops::Deref};
use parsers_complete::Parser;
diff --git a/src/xml/parsers.rs b/src/xml/parsers.rs
index 79d72b4..b98d68a 100644
--- a/src/xml/parsers.rs
+++ b/src/xml/parsers.rs
@@ -1,3 +1,7 @@
+// SPDX-FileCopyrightText: 2025 cel <cel@bunny.garden>
+//
+// SPDX-License-Identifier: AGPL-3.0-or-later
+
use nom::{
branch::alt,
bytes::streaming::{is_a, is_not, tag, take, take_while},
diff --git a/src/xml/parsers_complete.rs b/src/xml/parsers_complete.rs
index f18d0ff..ae97d9e 100644
--- a/src/xml/parsers_complete.rs
+++ b/src/xml/parsers_complete.rs
@@ -1,3 +1,7 @@
+// SPDX-FileCopyrightText: 2025 cel <cel@bunny.garden>
+//
+// SPDX-License-Identifier: AGPL-3.0-or-later
+
use nom::{
branch::alt,
bytes::complete::{is_a, is_not, tag, take, take_while},
@@ -40,7 +44,12 @@ pub trait Parser<'s> {
return Err(crate::error::Error::ExtraData(rest.to_string()));
}
}
- Result::Err(e) => return Err(crate::error::Error::ParseError(e.to_string())),
+ Result::Err(e) => {
+ return Err(crate::error::Error::ParseError(
+ input.to_string(),
+ e.to_string(),
+ ))
+ }
}
}
}