fix(缺陷管理): 提交到禅道缺陷里面的图片不正确的问题
--bug=1010615 --user=李玉号 【缺陷管理】-github#10586集成禅道后无法同步禅道缺陷里面的图片 https://www.tapd.cn/55049933/s/1113039 Closes #10586 Closes #10473
This commit is contained in:
parent
16975588c3
commit
a4eab7b39c
|
@ -392,10 +392,12 @@ public class ZentaoPlatform extends AbstractIssuePlatform {
|
||||||
String id = uploadFile(mdImage.getBody());
|
String id = uploadFile(mdImage.getBody());
|
||||||
// todo delete local file
|
// todo delete local file
|
||||||
int index = fileName.lastIndexOf(".");
|
int index = fileName.lastIndexOf(".");
|
||||||
|
String suffix = "";
|
||||||
if (index != -1) {
|
if (index != -1) {
|
||||||
// replace id
|
suffix = fileName.substring(index);
|
||||||
zentaoSteps = zentaoSteps.replaceAll(Pattern.quote(originSubUrl), id);
|
|
||||||
}
|
}
|
||||||
|
// replace id
|
||||||
|
zentaoSteps = zentaoSteps.replaceAll(Pattern.quote(originSubUrl), id + suffix);
|
||||||
}
|
}
|
||||||
// image link
|
// image link
|
||||||
String netImgRegex = "!\\[(.*?)]\\((http.*?)\\)";
|
String netImgRegex = "!\\[(.*?)]\\((http.*?)\\)";
|
||||||
|
|
Loading…
Reference in New Issue