Skip to content

Commit e013b18

Browse files
committed
Release 2.7
1 parent 0cf2969 commit e013b18

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
进入 `Release` 页下载最新版本即可,提供以下版本,按需选择:
99

10-
- **green**:绿色版本,exe文件,双击打开即可使用。【推荐】
10+
- **green**:绿色版本,exe文件,双击打开即可使用。
1111
- ~~**setup**:安装版本。 2.3 版本起不再提供,用的人很少。~~
1212

1313
### 1.2 基本使用
@@ -51,7 +51,7 @@
5151
5252
如果使用 UTF-8 后,打开文件仍然是乱码,可以尝试切换到其他编码。如果切换到其他编码后,问题仍没有解决。请找到一个能够正常渲染的文件,把它的文件编码告诉我,我将会补充到软件中。
5353
54-
**如何查看一个文件的编码:**直接使用 Windows 的记事本打开它,点击左上角的`文件->另存为`,在弹窗右下角的保存按钮旁边可以看到当前的文件编码。
54+
**如何查看一个文件的编码:** 直接使用 Windows 的记事本打开它,点击左上角的`文件->另存为`,在弹窗右下角的保存按钮旁边可以看到当前的文件编码。
5555
5656
### 1.4 双语歌词
5757
@@ -147,6 +147,10 @@
147147
148148
## 二、更新日志
149149
150+
#### 2020.3.26 Release 2.7
151+
152+
- 修复双语歌词空行显示分隔符
153+
150154
#### 2020.3.26 Release 2.6
151155
152156
- 支持指定文件编码

WindowsFormsApp1/Form1.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

WindowsFormsApp1/Form1.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,18 @@ private static string[] MergeLrc(string[] originLrcs, string[] translateLrcs, st
254254
else
255255
{
256256
int index = list.Count - 1;
257-
list[index] = list[index] + splitStr + c[i].Substring(str2Index);
257+
string subStr1 = list[index];
258+
string subStr2 = c[i].Substring(str2Index);
259+
260+
// 如果任意一方歌词不存在,则不显示分隔符
261+
if (string.IsNullOrEmpty(subStr1) || string.IsNullOrEmpty(subStr2))
262+
{
263+
list[index] = subStr1 + subStr2;
264+
}
265+
else
266+
{
267+
list[index] = subStr1 + splitStr + subStr2;
268+
}
258269
}
259270
}
260271
return list.ToArray();

0 commit comments

Comments
 (0)