Add array examples
This commit is contained in:
parent
c56760927c
commit
3eeeac6841
@ -143,9 +143,12 @@ fn tex_export_inner(tree: &ObjectChild, out: &mut String, required: bool) {
|
|||||||
None => "".to_string(),
|
None => "".to_string(),
|
||||||
Some(d) => tex_escape_str(d),
|
Some(d) => tex_escape_str(d),
|
||||||
},
|
},
|
||||||
match tree.node.examples.get(0) {
|
match (&tree.node.r#type, tree.node.examples.get(0)) {
|
||||||
None => "".to_string(),
|
(_, Some(e)) => tex_escape_str(e),
|
||||||
Some(e) => tex_escape_str(e),
|
(NodeType::Array { item }, _) if !item.examples.is_empty() => {
|
||||||
|
format!("[{}]", &item.examples.get(0).unwrap())
|
||||||
|
}
|
||||||
|
_ => "".to_string(),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
Loading…
Reference in New Issue
Block a user