File tree 1 file changed +4
-5
lines changed
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -22,9 +22,9 @@ pub fn metadata_ordered_list() -> FnResult<Json<MetaData>> {
22
22
}
23
23
24
24
fn is_list ( text : & str ) -> bool {
25
- bool is_unordered_list = text. starts_with ( "<ul>" ) && text. ends_with ( "</ul>" ) ;
26
- bool is_ordered_list = text. starts_with ( "<ol>" ) && text. ends_with ( "</ol>" ) ;
27
- return is_unordered_list && is_ordered_list
25
+ let is_unordered_list = text. starts_with ( "<ul>" ) && text. ends_with ( "</ul>" ) ;
26
+ let is_ordered_list = text. starts_with ( "<ol>" ) && text. ends_with ( "</ol>" ) ;
27
+ return is_unordered_list && is_ordered_list;
28
28
}
29
29
30
30
#[ plugin_fn]
@@ -46,7 +46,7 @@ pub fn unordered_list(Json(args): Json<Vec<Value>>) -> FnResult<String> {
46
46
} ;
47
47
let mut result = String :: new ( ) ;
48
48
for elem in elems {
49
- if is_list ( text ) {
49
+ if is_list ( elem ) {
50
50
result += elem;
51
51
continue ;
52
52
}
@@ -55,7 +55,6 @@ pub fn unordered_list(Json(args): Json<Vec<Value>>) -> FnResult<String> {
55
55
Ok ( format ! ( "<ul>{}</ul>" , result) )
56
56
}
57
57
58
-
59
58
#[ plugin_fn]
60
59
pub fn ordered_list ( Json ( args) : Json < Vec < Value > > ) -> FnResult < String > {
61
60
if args. len ( ) != 1 {
You can’t perform that action at this time.
0 commit comments