We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a9aa58 commit ab298b9Copy full SHA for ab298b9
src/table.rs
@@ -45,7 +45,7 @@ pub fn table(Json(args): Json<Vec<Value>>) -> FnResult<String> {
45
}
46
};
47
let mut result = String::from("");
48
- for i in 0..(elems.len() as i32 % col) {
+ for i in 0..(elems.len() as i32 + col - 1) / col {
49
let mut tr = String::from("");
50
for j in 0..col {
51
tr += &format!("<td>{}</td>", elems[(i * col + j) as usize]);
0 commit comments