正文增加字数上限、去除微博视频提示
This commit is contained in:
@@ -1,3 +1,15 @@
|
||||
# anian-plugin-friends
|
||||
|
||||
> 基于原作者v1.4.3代码修改
|
||||
|
||||
#### v1.4.3-1
|
||||
1. 大幅增加description字段的字符数上限
|
||||
2. 去除description字段内的微博视频提示
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# plugin-friends
|
||||
> 1.3.4版本重构朋友圈插件
|
||||
> 如果使用了之前版本,请清掉之前的所有数据,不然会有问题
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation platform('run.halo.tools.platform:plugin:2.20.0-SNAPSHOT')
|
||||
implementation platform('run.halo.tools.platform:plugin:2.20.11')
|
||||
compileOnly 'run.halo.app:api'
|
||||
|
||||
testImplementation 'run.halo.app:api'
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
version=1.3.7
|
||||
version=1.4.3-1
|
||||
|
||||
Generated
+9953
File diff suppressed because it is too large
Load Diff
@@ -177,9 +177,11 @@ public class RssSyncReconciler implements Reconciler<RssSyncReconciler.Request>,
|
||||
String description = friendPost.getSpec().getDescription();
|
||||
//解析html内容转换成文本
|
||||
if (StringUtils.isNotEmpty(description)){
|
||||
description = CommonUtils.parseAndTruncateHtml2Text(description, 200);
|
||||
description = CommonUtils.parseAndTruncateHtml2Text(description, 100000);
|
||||
String regexp = "[ *|\\s*]*";
|
||||
description = description.replaceFirst(regexp, "").trim();
|
||||
String weiboVideoRegex = "\\s[^\\s]*的微博视频 视频无法显示,请前往微博视频观看。";
|
||||
description = description.replaceAll(weiboVideoRegex, "");
|
||||
friendPostSpec.setDescription(description);
|
||||
}
|
||||
client.create(friendPost);
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user