Skip to content

Commit cdbb983

Browse files
committed
fix: mismatch brackets in str and para
1 parent 3320008 commit cdbb983

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/stmt.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ pub fn stmt(Json(args): Json<Vec<Value>>) -> FnResult<String> {
2828
"{{
2929
\"t\": \"Para\",
3030
\"c\": [
31-
\"{}\"
31+
{}
3232
]
3333
}},",
34-
text
34+
text[0..text.len() - 1].to_string()
3535
))
3636
}

src/text.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,11 @@ pub fn text(Json(args): Json<Vec<Value>>) -> FnResult<String> {
2424
))
2525
}
2626
};
27-
Ok(format!("{{\"t\": \"Str\", \"c\": \"{}\"}}", text))
27+
Ok(format!(
28+
"{{
29+
\"t\": \"Str\",
30+
\"c\": \"{}\"
31+
}},",
32+
text
33+
))
2834
}

0 commit comments

Comments
 (0)