)
})
+ test('allow unicode', () => {
+ const onError = jest.fn()
+ parseWithVModel('<span v-model="变.量" />', { onError })
+
+ expect(onError).toHaveBeenCalledTimes(0)
+ })
+
test('used on scope variable', () => {
const onError = jest.fn()
parseWithVModel('<span v-for="i in list" v-model="i" />', {
export const isSimpleIdentifier = (name: string): boolean =>
!nonIdentifierRE.test(name)
-const memberExpRE = /^[A-Za-z_$][\w$]*(?:\s*\.\s*[A-Za-z_$][\w$]*|\[[^\]]+\])*$/
+const memberExpRE = /^[A-Za-z_$\xA0-\uFFFF][\w$\xA0-\uFFFF]*(?:\s*\.\s*[A-Za-z_$\xA0-\uFFFF][\w$\xA0-\uFFFF]*|\[[^\]]+\])*$/
export const isMemberExpression = (path: string): boolean => {
if (!path) return false
return memberExpRE.test(path.trim())