File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
test/unit/modules/compiler Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 11/* @flow */
22
3- const fnExpRE = / ^ ( [ \w $ _ ] + | \( [ ^ ) ] * ?\) ) \s * = > | ^ f u n c t i o n \s * (?: [ \w $ ] + ) ? \s * \( /
3+ const fnExpRE = / ^ ( [ \w $ _ ] + | \( [ ^ ) ] * ?\) ) \s * = > | ^ f u n c t i o n (?: \s + [ \w $ ] + ) ? \s * \( /
44const fnInvokeRE = / \( [ ^ ) ] * ?\) ; * $ /
55const simplePathRE = / ^ [ A - Z a - z _ $ ] [ \w $ ] * (?: \. [ A - Z a - z _ $ ] [ \w $ ] * | \[ ' [ ^ ' ] * ?' ] | \[ " [ ^ " ] * ?" ] | \[ \d + ] | \[ [ A - Z a - z _ $ ] [ \w $ ] * ] ) * $ /
66
Original file line number Diff line number Diff line change @@ -345,6 +345,11 @@ describe('codegen', () => {
345345 `<input @input="onInput(');[\\'());');">` ,
346346 `with(this){return _c('input',{on:{"input":function($event){onInput(');[\\'());');}}})}`
347347 )
348+ // function name including a `function` part (#9920)
349+ assertCodegen (
350+ '<input @input="functionName()">' ,
351+ `with(this){return _c('input',{on:{"input":function($event){return functionName()}}})}`
352+ )
348353 } )
349354
350355 it ( 'generate events with multiple statements' , ( ) => {
You can’t perform that action at this time.
0 commit comments