File tree 2 files changed +6
-1
lines changed
test/unit/modules/compiler
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 1
1
/* @flow */
2
2
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 * \( /
4
4
const fnInvokeRE = / \( [ ^ ) ] * ?\) ; * $ /
5
5
const simplePathRE = / ^ [ A - Z a - z _ $ ] [ \w $ ] * (?: \. [ A - Z a - z _ $ ] [ \w $ ] * | \[ ' [ ^ ' ] * ?' ] | \[ " [ ^ " ] * ?" ] | \[ \d + ] | \[ [ A - Z a - z _ $ ] [ \w $ ] * ] ) * $ /
6
6
Original file line number Diff line number Diff line change @@ -345,6 +345,11 @@ describe('codegen', () => {
345
345
`<input @input="onInput(');[\\'());');">` ,
346
346
`with(this){return _c('input',{on:{"input":function($event){onInput(');[\\'());');}}})}`
347
347
)
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
+ )
348
353
} )
349
354
350
355
it ( 'generate events with multiple statements' , ( ) => {
You can’t perform that action at this time.
0 commit comments