diff --git a/src/main.rs b/src/main.rs index b819236..d365ca9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -143,9 +143,12 @@ fn tex_export_inner(tree: &ObjectChild, out: &mut String, required: bool) { None => "".to_string(), Some(d) => tex_escape_str(d), }, - match tree.node.examples.get(0) { - None => "".to_string(), - Some(e) => tex_escape_str(e), + match (&tree.node.r#type, tree.node.examples.get(0)) { + (_, Some(e)) => tex_escape_str(e), + (NodeType::Array { item }, _) if !item.examples.is_empty() => { + format!("[{}]", &item.examples.get(0).unwrap()) + } + _ => "".to_string(), } ) .unwrap();