diff options
author | HampusM <hampus@hampusmat.com> | 2023-02-27 20:29:04 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2023-02-27 20:29:04 +0100 |
commit | 8185ac7f4c466eaac178f1e4e8f1d3f7ef1bb49b (patch) | |
tree | f3e3abc3e9cb422f577f0370802ad9c95c2e191c /src | |
parent | 2df4eb37ecf373d04d5a499f31fef3a190e25164 (diff) |
feat: add program listing description part
Diffstat (limited to 'src')
-rw-r--r-- | src/description.rs | 10 |
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. |