File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
test/unit/modules/compiler Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 11/* @flow */
22
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 * $ /
44
55// keyCode aliases
66const keyCodes = {
Original file line number Diff line number Diff line change @@ -244,6 +244,14 @@ describe('codegen', () => {
244244 )
245245 } )
246246
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+
247255 it ( 'generate unhandled events' , ( ) => {
248256 assertCodegen (
249257 '<input @input="curent++">' ,
You can’t perform that action at this time.
0 commit comments