File tree 3 files changed +6
-4
lines changed
test/unit/modules/compiler
3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 1
1
/* @flow */
2
2
3
- const fnExpRE = / ^ \s * ( [ \w $ _ ] + | \( [ ^ ) ] * ?\) ) \s * = > | ^ f u n c t i o n \s * \( /
4
- const simplePathRE = / ^ \s * [ A - Z a - z _ $ ] [ \w $ ] * (?: \. [ A - Z a - z _ $ ] [ \w $ ] * | \[ ' . * ?' ] | \[ " . * ?" ] | \[ \d + ] | \[ [ A - Z a - z _ $ ] [ \w $ ] * ] ) * \s * $ /
3
+ const fnExpRE = / ^ ( [ \w $ _ ] + | \( [ ^ ) ] * ?\) ) \s * = > | ^ f u n c t i o n \s * \( /
4
+ const simplePathRE = / ^ [ A - Z a - z _ $ ] [ \w $ ] * (?: \. [ A - Z a - z _ $ ] [ \w $ ] * | \[ ' [ ^ ' ] * ?' ] | \[ " [ ^ " ] * ?" ] | \[ \d + ] | \[ [ A - Z a - z _ $ ] [ \w $ ] * ] ) * $ /
5
5
6
6
// keyCode aliases
7
7
const keyCodes : { [ key : string ] : number | Array < number > } = {
Original file line number Diff line number Diff line change @@ -100,7 +100,9 @@ export function addHandler (
100
100
events = el . events || ( el . events = { } )
101
101
}
102
102
103
- const newHandler : any = { value }
103
+ const newHandler : any = {
104
+ value : value . trim ( )
105
+ }
104
106
if ( modifiers !== emptyObject ) {
105
107
newHandler . modifiers = modifiers
106
108
}
Original file line number Diff line number Diff line change @@ -428,7 +428,7 @@ describe('codegen', () => {
428
428
it ( 'should not treat handler with unexpected whitespace as inline statement' , ( ) => {
429
429
assertCodegen (
430
430
'<input @input=" onInput ">' ,
431
- `with(this){return _c('input',{on:{"input": onInput }})}`
431
+ `with(this){return _c('input',{on:{"input":onInput}})}`
432
432
)
433
433
} )
434
434
You can’t perform that action at this time.
0 commit comments