Skip to content

Commit d40198d

Browse files
committed
修复xml CDATA里的换行被忽略的bug
1 parent a662102 commit d40198d

File tree

2 files changed

+2
-2
lines changed
  • liteflow-core/src/main/java/com/yomahub/liteflow/parser/helper
  • liteflow-testcase-el/liteflow-testcase-el-script-groovy-springboot/src/test/resources/xml-script

2 files changed

+2
-2
lines changed

liteflow-core/src/main/java/com/yomahub/liteflow/parser/helper/ParserHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public static void parseDocument(List<Document> documentList, Set<String> chainN
128128
name = e.attributeValue(NAME);
129129
clazz = e.attributeValue(_CLASS);
130130
type = e.attributeValue(TYPE);
131-
script = e.getTextTrim();
131+
script = e.getText();
132132
file = e.attributeValue(FILE);
133133

134134
// 构建 node

liteflow-testcase-el/liteflow-testcase-el-script-groovy-springboot/src/test/resources/xml-script/flow.el.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
]]>
2626
</node>
2727

28-
<node id="s2" name="选择脚本" type="switch_script">
28+
<node id="s2" name="选择脚本" type="switch_script" language="groovy">
2929
<![CDATA[
3030
count = defaultContext.getData("count");
3131
if(count > 100){

0 commit comments

Comments
 (0)