File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,10 @@ pub fn metadata_rules() -> FnResult<Json<MetaData>> {
14
14
#[ plugin_fn]
15
15
pub fn rules ( Json ( args) : Json < Vec < Value > > ) -> FnResult < String > {
16
16
if args. len ( ) != 0 {
17
- return Err ( WithReturnCode :: new ( anyhow:: anyhow!( "Usage: {{std.---}}" ) , 1 ) ) ;
17
+ return Err ( WithReturnCode :: new (
18
+ anyhow:: anyhow!( "Usage: {{std.---}}" ) ,
19
+ 1 ,
20
+ ) ) ;
18
21
}
19
22
Ok ( String :: from ( "<hr />" ) )
20
23
}
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ pub fn table(Json(args): Json<Vec<Value>>) -> FnResult<String> {
45
45
}
46
46
} ;
47
47
let mut result = String :: from ( "" ) ;
48
- for i in 0 ..( elems. len ( ) as i32 % col) {
48
+ for i in 0 ..( elems. len ( ) as i32 + col - 1 ) / col {
49
49
let mut tr = String :: from ( "" ) ;
50
50
for j in 0 ..col {
51
51
tr += & format ! ( "<td>{}</td>" , elems[ ( i * col + j) as usize ] ) ;
You can’t perform that action at this time.
0 commit comments