Skip to content

Commit

Permalink
fix: mismatch brackets in str and para
Browse files Browse the repository at this point in the history
  • Loading branch information
momeemt committed Oct 18, 2024
1 parent 3320008 commit cdbb983
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/stmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ pub fn stmt(Json(args): Json<Vec<Value>>) -> FnResult<String> {
"{{
\"t\": \"Para\",
\"c\": [
\"{}\"
{}
]
}},",
text
text[0..text.len() - 1].to_string()
))
}
8 changes: 7 additions & 1 deletion src/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,11 @@ pub fn text(Json(args): Json<Vec<Value>>) -> FnResult<String> {
))
}
};
Ok(format!("{{\"t\": \"Str\", \"c\": \"{}\"}}", text))
Ok(format!(
"{{
\"t\": \"Str\",
\"c\": \"{}\"
}},",
text
))
}

0 comments on commit cdbb983

Please sign in to comment.