Skip to content

Commit 7281cf4

Browse files
committed
去除路径前后空格
1 parent e5753a3 commit 7281cf4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ static string GetFilePath(string[] args)
101101
do
102102
{
103103
Console.Write("请拖入HTML文件或输入路径:");
104-
filePath = Console.ReadLine()?.Trim('"') ?? ""; // 读取并去除可能存在的引号
104+
filePath = Console.ReadLine()?.Trim().Trim('"') ?? ""; // 先用 Trim() 移除所有前后空白,再用 Trim('"') 移除前后可能存在的引号
105105

106106
if (string.IsNullOrWhiteSpace(filePath))
107107
{

0 commit comments

Comments
 (0)