From 44aade39011b099876b835990b4cc75d454aaa0a Mon Sep 17 00:00:00 2001 From: CaptainB Date: Fri, 25 Feb 2022 15:13:35 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95jmx?= =?UTF-8?q?=E4=B8=AD=E8=84=9A=E6=9C=AC=E7=A9=BA=E6=A0=BC=E8=A2=AB=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E6=8E=89=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1010634 --user=刘瑞斌 【性能测试】场景转性能测试后,脚本里少了个空格 https://www.tapd.cn/55049933/s/1110317 --- .../performance/parse/EngineSourceParserFactory.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/performance/parse/EngineSourceParserFactory.java b/backend/src/main/java/io/metersphere/performance/parse/EngineSourceParserFactory.java index 574112b205..28a4917009 100644 --- a/backend/src/main/java/io/metersphere/performance/parse/EngineSourceParserFactory.java +++ b/backend/src/main/java/io/metersphere/performance/parse/EngineSourceParserFactory.java @@ -59,7 +59,11 @@ public class EngineSourceParserFactory { ) { // 删除空白的行 List nodes = document.selectNodes("//text()[normalize-space(.)='']"); - nodes.forEach(node -> node.setText("")); + nodes.forEach(node -> { + if (node.getText().contains("\n")) { + node.setText(""); + } + }); XMLWriter xw = new XMLWriter(out, format); xw.setEscapeText(IS_TRANS);