summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/description.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/description.rs b/src/description.rs
index 7761f7b..e7cb951 100644
--- a/src/description.rs
+++ b/src/description.rs
@@ -88,6 +88,13 @@ impl FromElements for Description
.map(Part::VariableList)
.map_err(Self::Error::InvalidVariableList),
),
+ "programlisting" => Some(Ok(Part::ProgramListing(
+ part_elem
+ .child_elements()
+ .get_first_text_element()
+ .cloned()
+ .unwrap_or_default(),
+ ))),
"title" => None,
name => Some(Err(Self::Error::UnknownPartFound(name.to_string()))),
})
@@ -126,6 +133,9 @@ pub enum Part
/// Variable list.
VariableList(VariableList),
+
+ /// Program listing.
+ ProgramListing(String),
}
/// Reference entry description paragraph.