mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-14 20:22:07 +08:00
enhancement #I5GBXI 支持EL中任意地方的注释
This commit is contained in:
@@ -393,7 +393,7 @@ public class ParserHelper {
|
||||
|
||||
private static class RegexUtil{
|
||||
// java 注释的正则表达式
|
||||
private static final String REGEX_NOTE = "/\\*((?!\\*/).|[\\r\\n])*?\\*/|[ \\t]*//.*";
|
||||
private static final String REGEX_COMMENT = "/\\*((?!\\*/).|[\\r\\n])*?\\*/|[ \\t]*//.*";
|
||||
|
||||
/**
|
||||
* 移除 el 表达式中的注释,支持 java 的注释,包括单行注释、多行注释,
|
||||
@@ -407,7 +407,7 @@ public class ParserHelper {
|
||||
return elStr;
|
||||
}
|
||||
|
||||
String text = Pattern.compile(REGEX_NOTE)
|
||||
String text = Pattern.compile(REGEX_COMMENT)
|
||||
.matcher(elStr)
|
||||
// 移除注释
|
||||
.replaceAll(CharSequenceUtil.EMPTY)
|
||||
|
||||
Reference in New Issue
Block a user