Explorar o código

换行有问题 (#218)

吃了会中毒 %!s(int64=5) %!d(string=hai) anos
pai
achega
203547321c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Tools/Proto2CS/Program.cs

+ 1 - 1
Tools/Proto2CS/Program.cs

@@ -78,7 +78,7 @@ namespace ET
                 
                 if (newline.StartsWith("//ResponseType"))
                 {
-                    string responseType = line.Split(" ")[1];
+                    string responseType = line.Split(" ")[1].TrimEnd('\r', '\n');
                     sb.AppendLine($"\t[ResponseType(typeof({responseType}))]");
                     continue;
                 }