diff options
author | bnewbold <bnewbold@robocracy.org> | 2017-01-28 21:25:37 -0800 |
---|---|---|
committer | bnewbold <bnewbold@robocracy.org> | 2017-01-28 21:25:37 -0800 |
commit | 1aec9b6479beecd327456780ae7c711040011933 (patch) | |
tree | 036c4beb4ac2732d67adab5b9fc68ef0c384c7a2 /src/repr_latex.rs | |
parent | 26737fe52301080b6c0573cd19c1c53715835e9e (diff) | |
download | modelthing-1aec9b6479beecd327456780ae7c711040011933.tar.gz modelthing-1aec9b6479beecd327456780ae7c711040011933.zip |
fiddling with whitespace for other reprs
Diffstat (limited to 'src/repr_latex.rs')
-rw-r--r-- | src/repr_latex.rs | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/src/repr_latex.rs b/src/repr_latex.rs index b5426e8..51c9e7a 100644 --- a/src/repr_latex.rs +++ b/src/repr_latex.rs @@ -34,12 +34,13 @@ impl ReprVarsHTML for ModelicaModel { let mut rows = vec![]; for c in &self.components { - rows.push(format!(r#"<tr><td>\({name}\)</td> - <td>{prefix}</td> - <td>{description}</td> - <td>\({default}\)</td> - <td>{specifier}</td> - </tr>"#, + rows.push(format!( +r#"<tr><td>\({name}\)</td> + <td>{prefix}</td> + <td>{description}</td> + <td>\({default}\)</td> + <td>{specifier}</td> + </tr>"#, prefix = if let Some(ref cp) = c.prefix { format!("{:?}", cp) } else { "free".to_string() }, @@ -53,15 +54,17 @@ impl ReprVarsHTML for ModelicaModel { else { "".to_string() })); } let rows = rows.join("\n"); - Ok(format!(r#"<table> - <tr><th>Variable</th> - <th>Type</th> - <th>Description</th> - <th>Value (default)</th> - <th>Datatype</th> - {rows} - </table>"#, - rows = rows)) + Ok(format!( +r#"<table> + <tr><th>Variable + <th>Type + <th>Description + <th>Value (default) + <th>Datatype + </tr> + {rows} +</table>"#, + rows = rows.join("\n ")) } } |