fixed: 缓存文件无法覆盖问题;纯空格删除后勘误表数据对不上;

This commit is contained in:
LittleBoy 2024-12-25 15:24:21 +08:00
parent ad0afdc54c
commit 95de468a04
7 changed files with 10 additions and 1 deletions

Binary file not shown.

View File

@ -679,6 +679,11 @@ namespace AIProofread
try
{
Logger.Log("SaveCache " + document.fileName + " used " + document.ProofreadCachePath);
if (File.Exists(document.ProofreadCachePath))
{
File.Delete(document.ProofreadCachePath);
}
File.WriteAllText(document.ProofreadCachePath, cache);
// 对缓存文件进行隐藏
File.SetAttributes(document.ProofreadCachePath, FileAttributes.Hidden);

View File

@ -25,7 +25,7 @@ namespace AIProofread
/// <summary>
/// 网页访问地址
/// </summary>
public static string WEB_PATH = "http://localhost:5173/"; //pre-gm-plugin.gachafun.com 192.168.0.231:5137 192.168.10.100:5173 gm2-plugin.zverse.group
public static string WEB_PATH = "https://pre-gm-plugin.gachafun.com/"; //pre-gm-plugin.gachafun.com 192.168.0.231:5137 192.168.10.100:5173 gm2-plugin.zverse.group
public static bool RUN_IN_DEBUG = true;
public static AppEnvironment APP_ENV = AppEnvironment.Dev;
#else

View File

@ -25,8 +25,12 @@ namespace AIProofread.Model
foreach (var item in marks)
{
// 没有mark
if (item.Value.mark == null) continue;
var it = item.Value.content;
// 单纯删除空格
if (it.Tag == "d" && it.Origin.Trim().Length == 0) continue;
var range = item.Value.mark.Range;
// 获取书签在文档的页码数