mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-04 06:02:08 +08:00
fix: limit mihomo yaml wildcard quoting to fake-ip-filter
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use crate::{config::with_encryption, enhance::seq::SeqMap, utils::yaml_emitter};
|
||||
use crate::{config::with_encryption, enhance::seq::SeqMap};
|
||||
use anyhow::{Context as _, Result, anyhow, bail};
|
||||
use clash_verge_logging::{Type, logging};
|
||||
use nanoid::nanoid;
|
||||
@@ -59,7 +59,7 @@ pub async fn read_seq_map(path: &PathBuf) -> Result<SeqMap> {
|
||||
/// save the data to the file
|
||||
/// can set `prefix` string to add some comments
|
||||
pub async fn save_yaml<T: Serialize + Sync>(path: &PathBuf, data: &T, prefix: Option<&str>) -> Result<()> {
|
||||
let data_str = with_encryption(|| async { yaml_emitter::to_mihomo_config_string(data) }).await?;
|
||||
let data_str = with_encryption(|| async { serde_yaml_ng::to_string(data) }).await?;
|
||||
|
||||
let yaml_str = match prefix {
|
||||
Some(prefix) => format!("{prefix}\n\n{data_str}"),
|
||||
|
||||
Reference in New Issue
Block a user