fix(用例管理): 修复导出没有表格格式问题

--bug=1047747 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001047747
This commit is contained in:
guoyuqi 2024-10-22 11:39:30 +08:00 committed by Craftsman
parent 6f45712da9
commit 97d026e3d6
1 changed files with 1 additions and 17 deletions

View File

@ -77,9 +77,6 @@ import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.regex.MatchResult;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
/**
@ -861,21 +858,8 @@ public class FunctionalCaseFileService {
}
public String parseHtml(String html) {
Pattern pattern = Pattern.compile("<p[^>]*>(.*?)</p>");
Matcher matcher = pattern.matcher(html);
StringBuilder result = new StringBuilder();
List<MatchResult> list = matcher.results().toList();
if (CollectionUtils.isNotEmpty(list)) {
for (MatchResult matchResult : list) {
result.append(matchResult.group(1));
return html.replaceAll("</?p[^>]*>", "");
}
} else {
result.append(html);
}
return result.toString();
}
/**
* 获取模块map