+#[derive(PartialEq, Eq, Debug)]
+pub struct HTML(String);
+impl HTML {
+ fn escape(value: &str) -> HTML {
+ let mut escaped: String = String::new();
+ for c in value.chars() {
+ match c {
+ '>' => escaped.push_str(">"),
+ '<' => escaped.push_str("<"),
+ '\'' => escaped.push_str("'"),
+ '"' => escaped.push_str("""),
+ '&' => escaped.push_str("&"),
+ ok_c => escaped.push(ok_c),
+ }
+ }
+ HTML(escaped)
+ }
+}
+impl From<&str> for HTML {
+ fn from(value: &str) -> HTML {
+ HTML(String::from(value))
+ }
+}
+impl FromIterator<HTML> for HTML {
+ fn from_iter<T>(iter: T) -> HTML
+ where
+ T: IntoIterator<Item = HTML>,
+ {
+ HTML(iter.into_iter().map(|html| html.0).collect::<String>())
+ }
+}
+impl std::fmt::Display for HTML {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ write!(f, "{}", self.0)
+ }
+}
+
+#[derive(Debug, PartialEq, Eq, Hash)]
+struct Entry<'a> {
+ col: &'a str,
+ instance: Option<&'a str>,
+}
+impl<'a> From<&'a str> for Entry<'a> {
+ fn from(value: &'a str) -> Entry<'a> {
+ match value.split_once(':') {
+ None => Entry {
+ col: value,
+ instance: None,
+ },
+ Some((col, instance)) => Entry {
+ col: col.trim(),
+ instance: Some(instance.trim()),
+ },
+ }
+ }
+}
+