修复filter参数中存在变量的用法问题 (#1833)

This commit is contained in:
liaoxuezhi 2021-04-20 16:28:54 +08:00 committed by GitHub
parent f508d799ae
commit d0aec7adf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -718,7 +718,7 @@ export const resolveVariableAndFilter = (
// 先只支持一层吧
finalKey = finalKey.replace(
/(\\|\\\$)?\$(?:((?:\w+\:)?[a-zA-Z0-9_.][a-zA-Z0-9_.\[\]]*)|{([^}{]+)})/g,
/(\\|\\\$)?\$(?:([a-zA-Z0-9_.][a-zA-Z0-9_.\[\]]*)|{([^}{]+)})/g,
(_, escape) => {
return escape
? _.substring(1)