diff --git a/src-tauri/src/manager/api.rs b/src-tauri/src/manager/api.rs index 22c1dfee..1fe9dfef 100644 --- a/src-tauri/src/manager/api.rs +++ b/src-tauri/src/manager/api.rs @@ -37,6 +37,8 @@ pub async fn translate(content: &str) -> Result { // 转换为 url 编码 let content = utf8_percent_encode(content, NON_ALPHANUMERIC).to_string(); + // 将多行合并一行 + let content = content.replace('\n', " ").replace('\r', " "); let host = if config::mode() { mirror::one() } else {