To html and to md (#453)

* MathEval Variance and Stddev

* Fix tests and linting

* Typo

* Deal with streams when they are not tables

* First draft of these commands

* To MD

* To md and to html

* Fixed cargo and to_md

* `into_abbreviated_string` instead of `into_string`

* Changed how inner tables are displayed
This commit is contained in:
Luccas Mateus
2021-12-09 22:16:35 -03:00
committed by GitHub
parent 865906e450
commit 7a892ec5d7
12 changed files with 1302 additions and 15 deletions

View File

@ -391,11 +391,18 @@ impl Value {
)
}
Value::String { val, .. } => val,
Value::List { vals: val, .. } => format!(
"[list {} item{}]",
val.len(),
if val.len() == 1 { "" } else { "s" }
),
Value::List { ref vals, .. } => match &vals[..] {
[Value::Record { .. }, _end @ ..] => format!(
"[table {} row{}]",
vals.len(),
if vals.len() == 1 { "" } else { "s" }
),
_ => format!(
"[list {} item{}]",
vals.len(),
if vals.len() == 1 { "" } else { "s" }
),
},
Value::Record { cols, .. } => format!(
"{{record {} field{}}}",
cols.len(),