Skip to content

Commit 982f024

Browse files
committed
脚本zip名表存取时增加空行过滤,尝试去表格作者栏右对齐
1 parent 595bd16 commit 982f024

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

AUTO-UPDATE.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function updatePlugins(string $tableFile, array $requested, string $token = '',
7777
$release = 0;
7878
$done = 0;
7979
$nameList = 'ZIP_CDN/NAME_LIST.log';
80-
$listConent = file_exists($nameList) ? explode('README.md ALL' . PHP_EOL, file_get_contents($nameList)) : [];
80+
$listConent = file_exists($nameList) ? explode('README.md ALL' . PHP_EOL, trim(file_get_contents($nameList))) : [];
8181
$listNames = $listConent ? explode(PHP_EOL, $listConent[0]) : [];
8282
$movable = [];
8383
$allNames = $tf ? ['README.md ALL'] : (isset($listConent[1]) ? explode(PHP_EOL, $listConent[1]) : []);
@@ -553,7 +553,7 @@ function updatePlugins(string $tableFile, array $requested, string $token = '',
553553
if ($tf) {
554554
$listNames = array_merge($listNames, $allNames); //临时记录全表
555555
}
556-
file_put_contents($nameList, implode(PHP_EOL, $listNames));
556+
file_put_contents($nameList, implode(PHP_EOL, array_filter($listNames)));
557557

558558
if ($allNames) {
559559
//检查重复项

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
```
3737

3838
名称 | 简介 | 版本 | 作者 | zip包
39-
---- | ----: | :---: | ----: | :----:
39+
---- | ----: | :---: | ---- | :----:
4040
[AMP](AMP) | 生成AMP/MIP移动标准页面 | 0.7.6.1 | [Holmesian](https://github.com/holmesian) | [Download](https://github.com/typecho-fans/plugins/releases/download/plugins-A_to_C/AMP.zip)
4141
[AbbrSlug](AbbrSlug) | 生成数字文章缩略名 | 1.0.0 | [羽叶](https://github.com/cyea) | [Download](https://github.com/typecho-fans/plugins/releases/download/plugins-A_to_C/AbbrSlug.zip)
4242
[AjaxComments](AjaxComments) | 嵌套评论Ajax异步提交效果 | 1.2.0 | [Byends](https://github.com/visamz), Willin Kan | [Download](https://github.com/typecho-fans/plugins/releases/download/plugins-A_to_C/AjaxComments.zip)

0 commit comments

Comments
 (0)