fixed: 缓存文件无法覆盖问题;纯空格删除后勘误表数据对不上;
This commit is contained in:
parent
ad0afdc54c
commit
95de468a04
Binary file not shown.
@ -679,6 +679,11 @@ namespace AIProofread
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
Logger.Log("SaveCache " + document.fileName + " used " + document.ProofreadCachePath);
|
Logger.Log("SaveCache " + document.fileName + " used " + document.ProofreadCachePath);
|
||||||
|
|
||||||
|
if (File.Exists(document.ProofreadCachePath))
|
||||||
|
{
|
||||||
|
File.Delete(document.ProofreadCachePath);
|
||||||
|
}
|
||||||
File.WriteAllText(document.ProofreadCachePath, cache);
|
File.WriteAllText(document.ProofreadCachePath, cache);
|
||||||
// 对缓存文件进行隐藏
|
// 对缓存文件进行隐藏
|
||||||
File.SetAttributes(document.ProofreadCachePath, FileAttributes.Hidden);
|
File.SetAttributes(document.ProofreadCachePath, FileAttributes.Hidden);
|
||||||
|
@ -25,7 +25,7 @@ namespace AIProofread
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 网页访问地址
|
/// 网页访问地址
|
||||||
/// </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 bool RUN_IN_DEBUG = true;
|
||||||
public static AppEnvironment APP_ENV = AppEnvironment.Dev;
|
public static AppEnvironment APP_ENV = AppEnvironment.Dev;
|
||||||
#else
|
#else
|
||||||
|
@ -25,8 +25,12 @@ namespace AIProofread.Model
|
|||||||
|
|
||||||
foreach (var item in marks)
|
foreach (var item in marks)
|
||||||
{
|
{
|
||||||
|
// 没有mark
|
||||||
if (item.Value.mark == null) continue;
|
if (item.Value.mark == null) continue;
|
||||||
var it = item.Value.content;
|
var it = item.Value.content;
|
||||||
|
// 单纯删除空格
|
||||||
|
if (it.Tag == "d" && it.Origin.Trim().Length == 0) continue;
|
||||||
|
|
||||||
var range = item.Value.mark.Range;
|
var range = item.Value.mark.Range;
|
||||||
|
|
||||||
// 获取书签在文档的页码数
|
// 获取书签在文档的页码数
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user