LorisYounger / LinePutScript

LinePutScript是一种数据交换格式定义行读取结构和描述其内容的标准语言
Apache License 2.0
9 stars 2 forks source link

如果密钥包含 url 和 `/com`,它就会变成 `,`。 #1

Closed yupix closed 1 year ago

yupix commented 1 year ago

以下代码用于读入 VPet 翻译文件,使用 ToString() 进行编辑并输出。 在这种情况下,Sub.TextDeReplace 用于恢复已被内部替换为 /com 等的原始文件。 在这种情况下,我遇到了麻烦,因为如果在 URL 等中包含 /com,它就会被 ,替换。 有什么解决办法吗?

有问题密钥的 URL

https://github.com/LorisYounger/VPet/blob/main/VPet-Simulator.Windows/mod/0000_core/lang/zh-Hans/Base2306.lps#L246

代码摘录

var lps = new LpsDocument(File.ReadAllText(filePath));
// 某种操纵
File.WriteAllText(exportFilePath, Sub.TextDeReplace(lps.ToString()));
LorisYounger commented 1 year ago

转义下, 用 /! 代替/