style; 优化提取样式

This commit is contained in:
陈淳
2024-01-05 10:24:58 +08:00
parent cb07b04664
commit 6253fed3bb

View File

@@ -38,7 +38,7 @@ namespace Yi.Framework.Bbs.Domain.Managers.ArticleImport
for (int i = 0; i < lines.Length; i++)
{
//编码问题
if (lines[i] == "---" || lines[i]== "---")
if (lines[i] == "---")
{
num++;
if (num == 2)
@@ -56,6 +56,11 @@ namespace Yi.Framework.Bbs.Domain.Managers.ArticleImport
{
linesRef.RemoveRange(0, startIndex + 1);
}
else
{
//去除头部
linesRef.RemoveRange(0,6);
}
var result = string.Join(Environment.NewLine, linesRef);
f.Content = result;
return f;