diff options
author | Minijackson <minijackson@riseup.net> | 2019-11-23 19:27:21 +0100 |
---|---|---|
committer | Minijackson <minijackson@riseup.net> | 2019-11-23 19:31:58 +0100 |
commit | 860b73f1644ecd6548ae403ec483625fb7b625ea (patch) | |
tree | 1e0ab5ecf2a77a66e2a176364ecb151a58468426 /src/pandoc/types.rs | |
parent | 304d9f220cc208dd78fce11b703354ecd8d2168c (diff) | |
download | poseidoc-860b73f1644ecd6548ae403ec483625fb7b625ea.tar.gz poseidoc-860b73f1644ecd6548ae403ec483625fb7b625ea.zip |
entities rework, allow "inline" documentation, merge config with cli
Diffstat (limited to 'src/pandoc/types.rs')
-rw-r--r-- | src/pandoc/types.rs | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/pandoc/types.rs b/src/pandoc/types.rs deleted file mode 100644 index dc5be64..0000000 --- a/src/pandoc/types.rs +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | use crate::pandoc::{Block, Inline}; | ||
2 | |||
3 | #[derive(Debug, Clone)] | ||
4 | pub(super) struct Class { | ||
5 | inners: Vec<Inner>, | ||
6 | } | ||
7 | |||
8 | #[derive(Debug, Clone)] | ||
9 | struct Inner { | ||
10 | kind: InnerKind, | ||
11 | name: String, | ||
12 | //refid: String | ||
13 | } | ||
14 | |||
15 | #[derive(Debug, Clone)] | ||
16 | enum InnerKind { | ||
17 | Class, | ||
18 | Enum, | ||
19 | } | ||
20 | |||
21 | impl std::fmt::Display for InnerKind { | ||
22 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
23 | match self { | ||
24 | InnerKind::Class => write!(f, "class"), | ||
25 | InnerKind::Enum => write!(f, "enum"), | ||
26 | } | ||
27 | } | ||
28 | } | ||
29 | |||
30 | impl From<Inner> for (Vec<Inline>, Vec<Vec<Block>>) { | ||
31 | fn from(inner: Inner) -> (Vec<Inline>, Vec<Vec<Block>>) { | ||
32 | ( | ||
33 | vec![Inline::Str(inner.name)], | ||
34 | vec![vec![Block::Plain(vec![Inline::Str( | ||
35 | inner.kind.to_string(), | ||
36 | )])]], | ||
37 | ) | ||
38 | } | ||
39 | } | ||