File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 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
7878 } , { } )
7979
8080 const targetStr = Object . keys ( sourceObj )
81- . map ( key => `${ key } : ' ${ sourceObj [ key ] } ' ` )
81+ . map ( key => `${ key } : ${ sourceObj [ key ] } ` )
8282 . join ( ', ' )
8383
84- return `{${ targetStr } }`
84+ return `{ ${ targetStr } }`
8585}
Original file line number Diff line number Diff line change 55export const StringRegx = / ' ( [ ^ ' \n ] + ) ' | " ( [ ^ " \n ] + ) " / gu
66
77// 标识特殊字符串前缀,表示含有特殊字符需要 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
99
1010// 特殊字符串里面的非法参数,若有一个非法参数则不抛出 codeAction
1111export const inValidParamsRegx = / \{ \s * ( [ A - Z a - z _ ] + ) : \s * \} / u
You can’t perform that action at this time.
0 commit comments