fix: 同步缺陷失败
This commit is contained in:
parent
85502e3841
commit
12705eb83a
|
@ -234,6 +234,9 @@ public abstract class AbstractIssuePlatform implements IssuesPlatform {
|
||||||
// ![中心主题.png](/resource/md/get/a0b19136_中心主题.png) -> <img src="xxx/resource/md/get/a0b19136_中心主题.png"/>
|
// ![中心主题.png](/resource/md/get/a0b19136_中心主题.png) -> <img src="xxx/resource/md/get/a0b19136_中心主题.png"/>
|
||||||
String regex = "(\\!\\[.*?\\]\\((.*?)\\))";
|
String regex = "(\\!\\[.*?\\]\\((.*?)\\))";
|
||||||
Pattern pattern = Pattern.compile(regex);
|
Pattern pattern = Pattern.compile(regex);
|
||||||
|
if (StringUtils.isBlank(input)) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
Matcher matcher = pattern.matcher(input);
|
Matcher matcher = pattern.matcher(input);
|
||||||
String result = "";
|
String result = "";
|
||||||
while (matcher.find()) {
|
while (matcher.find()) {
|
||||||
|
@ -250,6 +253,9 @@ public abstract class AbstractIssuePlatform implements IssuesPlatform {
|
||||||
|
|
||||||
protected String removeImage(String input) {
|
protected String removeImage(String input) {
|
||||||
String regex = "(\\!\\[.*?\\]\\((.*?)\\))";
|
String regex = "(\\!\\[.*?\\]\\((.*?)\\))";
|
||||||
|
if (StringUtils.isBlank(input)) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
Matcher matcher = Pattern.compile(regex).matcher(input);
|
Matcher matcher = Pattern.compile(regex).matcher(input);
|
||||||
while (matcher.find()) {
|
while (matcher.find()) {
|
||||||
matcher.group();
|
matcher.group();
|
||||||
|
@ -262,6 +268,9 @@ public abstract class AbstractIssuePlatform implements IssuesPlatform {
|
||||||
// <img src="xxx/resource/md/get/a0b19136_中心主题.png"/> -> ![中心主题.png](/resource/md/get/a0b19136_中心主题.png)
|
// <img src="xxx/resource/md/get/a0b19136_中心主题.png"/> -> ![中心主题.png](/resource/md/get/a0b19136_中心主题.png)
|
||||||
String regex = "(<img\\s*src=\\\"(.*?)\\\".*?>)";
|
String regex = "(<img\\s*src=\\\"(.*?)\\\".*?>)";
|
||||||
Pattern pattern = Pattern.compile(regex);
|
Pattern pattern = Pattern.compile(regex);
|
||||||
|
if (StringUtils.isBlank(input)) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
Matcher matcher = pattern.matcher(input);
|
Matcher matcher = pattern.matcher(input);
|
||||||
String result = input;
|
String result = input;
|
||||||
while (matcher.find()) {
|
while (matcher.find()) {
|
||||||
|
@ -281,6 +290,9 @@ public abstract class AbstractIssuePlatform implements IssuesPlatform {
|
||||||
List<File> files = new ArrayList<>();
|
List<File> files = new ArrayList<>();
|
||||||
String regex = "(\\!\\[.*?\\]\\((.*?)\\))";
|
String regex = "(\\!\\[.*?\\]\\((.*?)\\))";
|
||||||
Pattern pattern = Pattern.compile(regex);
|
Pattern pattern = Pattern.compile(regex);
|
||||||
|
if (StringUtils.isBlank(input)) {
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
Matcher matcher = pattern.matcher(input);
|
Matcher matcher = pattern.matcher(input);
|
||||||
while (matcher.find()) {
|
while (matcher.find()) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue