Skip to content

Commit

Permalink
fix: fixed output json error of ScriptBlockText value when ScriptBloc…
Browse files Browse the repository at this point in the history
…kText is empty #1189
  • Loading branch information
hitenkoku committed Oct 15, 2023
1 parent 8360b69 commit c8060d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/afterfact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1581,9 +1581,9 @@ pub fn output_json_str(
output_stock.push(format!(" \"{key}\": {{"));
};
for (idx, contents) in details_target_stock.iter().enumerate() {
let (key, value) = contents.split_once(": ").unwrap_or_default();
let (key, value) = contents.split_once(':').unwrap_or_default();
let output_key = _convert_valid_json_str(&[key], false);
let fmted_val = _convert_valid_json_str(&[value], false);
let fmted_val = _convert_valid_json_str(&[value.trim_start()], false);

if idx != details_target_stock.len() - 1 {
output_stock.push(format!(
Expand Down

0 comments on commit c8060d4

Please sign in to comment.