2 Commits

Author SHA1 Message Date
d43b8342bc fix scn patch 2025-09-04 23:23:59 +08:00
fdb5456926 Fix mark bug 2025-09-04 23:01:20 +08:00
2 changed files with 6 additions and 4 deletions

View File

@@ -90,7 +90,7 @@ impl<'a> M3tParser<'a> {
}) })
.replace("\\n", "\n") .replace("\\n", "\n")
} else { } else {
let mut tmp = message.replace("\\n", "\n"); let mut tmp = message.to_owned();
if let Some(llm) = llm.take() { if let Some(llm) = llm.take() {
if tmp == llm { if tmp == llm {
if let Some(mark) = self.llm_mark { if let Some(mark) = self.llm_mark {
@@ -98,7 +98,7 @@ impl<'a> M3tParser<'a> {
} }
} }
} }
tmp tmp.replace("\\n", "\n")
}; };
if let Some(ori) = ori.take() { if let Some(ori) = ori.take() {
map.insert(ori, message); map.insert(ori, message);
@@ -160,7 +160,7 @@ impl<'a> M3tParser<'a> {
}) })
.replace("\\n", "\n") .replace("\\n", "\n")
} else { } else {
let mut tmp = message.replace("\\n", "\n"); let mut tmp = message.to_owned();
if let Some(llm) = llm.take() { if let Some(llm) = llm.take() {
if tmp == llm { if tmp == llm {
if let Some(mark) = self.llm_mark { if let Some(mark) = self.llm_mark {
@@ -168,7 +168,7 @@ impl<'a> M3tParser<'a> {
} }
} }
} }
tmp tmp.replace("\\n", "\n")
}; };
messages.push(Message::new(message, name.take())); messages.push(Message::new(message, name.take()));
} else { } else {

View File

@@ -842,6 +842,7 @@ impl<'a> ImportMes<'a> {
} }
} }
obj[&self.text_key].set_string(text.replace("\n", "\\n")); obj[&self.text_key].set_string(text.replace("\n", "\\n"));
return;
} else { } else {
eprintln!( eprintln!(
"Warning: chat message '{}' not found in translation table.", "Warning: chat message '{}' not found in translation table.",
@@ -887,6 +888,7 @@ impl<'a> ImportMes<'a> {
} }
} }
list[i].set_string(text.replace("\n", "\\n")); list[i].set_string(text.replace("\n", "\\n"));
return;
} else { } else {
eprintln!( eprintln!(
"Warning: chat message '{}' not found in translation table.", "Warning: chat message '{}' not found in translation table.",