File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -78,8 +78,8 @@ export const specialStringParams2String = (params: SpecialStringParams[]): strin
78
78
} , { } )
79
79
80
80
const targetStr = Object . keys ( sourceObj )
81
- . map ( key => `${ key } : ' ${ sourceObj [ key ] } ' ` )
81
+ . map ( key => `${ key } : ${ sourceObj [ key ] } ` )
82
82
. join ( ', ' )
83
83
84
- return `{${ targetStr } }`
84
+ return `{ ${ targetStr } }`
85
85
}
Original file line number Diff line number Diff line change 5
5
export const StringRegx = / ' ( [ ^ ' \n ] + ) ' | " ( [ ^ " \n ] + ) " / gu
6
6
7
7
// 标识特殊字符串前缀,表示含有特殊字符需要 react-intl-linter 识别 'react-intl=你好,{name: 约翰}' 或 '$=你好,{name: 约翰}'
8
- export const SpecialStringRegx = / ^ (?: r e a c t - i n t l | \$ ) = ( [ ^ " \n ' ] + ) / u
8
+ export const SpecialStringRegx = / ^ (?: r e a c t - i n t l | \$ ) = ( [ ^ \n ] + ) / u
9
9
10
10
// 特殊字符串里面的非法参数,若有一个非法参数则不抛出 codeAction
11
11
export const inValidParamsRegx = / \{ \s * ( [ A - Z a - z _ ] + ) : \s * \} / u
You can’t perform that action at this time.
0 commit comments