File tree 2 files changed +9
-1
lines changed
test/unit/modules/compiler
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 1
1
/* @flow */
2
2
3
- const simplePathRE = / ^ [ A - Z a - z _ $ ] [ \w $ ] * (?: \. [ A - Z a - z _ $ ] [ \w $ ] * | \[ ' .* ?' \] | \[ " .* ?" \] | \[ \d + \] | \[ [ A - Z a - z _ $ ] [ \w $ ] * \] ) * $ /
3
+ const simplePathRE = / ^ \s * [ A - Z a - z _ $ ] [ \w $ ] * (?: \. [ A - Z a - z _ $ ] [ \w $ ] * | \[ ' .* ?' \] | \[ " .* ?" \] | \[ \d + \] | \[ [ A - Z a - z _ $ ] [ \w $ ] * \] ) * \s * $ /
4
4
5
5
// keyCode aliases
6
6
const keyCodes = {
Original file line number Diff line number Diff line change @@ -244,6 +244,14 @@ describe('codegen', () => {
244
244
)
245
245
} )
246
246
247
+ // #3893
248
+ it ( 'should not treat handler with unexpected whitespace as inline statement' , ( ) => {
249
+ assertCodegen (
250
+ '<input @input=" onInput ">' ,
251
+ `with(this){return _h('input',{on:{"input": onInput }})}`
252
+ )
253
+ } )
254
+
247
255
it ( 'generate unhandled events' , ( ) => {
248
256
assertCodegen (
249
257
'<input @input="curent++">' ,
You can’t perform that action at this time.
0 commit comments