File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -46,11 +46,11 @@ var jQuery = function( selector, context ) {
46
46
rmozilla = / ( m o z i l l a ) (?: .* ? r v : ( [ \w . ] + ) ) ? / ,
47
47
48
48
// Matches dashed string for camelizing
49
- rdashAlpha = / - ( [ a - z ] ) / ig,
49
+ rdashAlpha = / - ( [ a - z ] | [ 0 - 9 ] ) / ig,
50
50
51
51
// Used by jQuery.camelCase as callback to replace()
52
52
fcamelCase = function ( all , letter ) {
53
- return letter . toUpperCase ( ) ;
53
+ return ( letter + "" ) . toUpperCase ( ) ;
54
54
} ,
55
55
56
56
// Keep a UserAgent string for use with jQuery.browser
Original file line number Diff line number Diff line change @@ -538,10 +538,13 @@ test("jQuery.data supports interoperable hyphenated/camelCase get/set of propert
538
538
"an-object" : { } ,
539
539
"bool-true" : true ,
540
540
"bool-false" : false ,
541
- "some-json" : '{ "foo": "bar" }'
541
+ "some-json" : '{ "foo": "bar" }' ,
542
+ "num-1-middle" : true ,
543
+ "num-end-2" : true ,
544
+ "2-num-start" : true
542
545
} ;
543
546
544
- expect ( 18 ) ;
547
+ expect ( 24 ) ;
545
548
546
549
jQuery . each ( datas , function ( key , val ) {
547
550
div . data ( key , val ) ;
@@ -578,4 +581,4 @@ test("jQuery.data supports interoperable removal of hyphenated/camelCase propert
578
581
equal ( div . data ( key ) , undefined , "get: " + key ) ;
579
582
580
583
} ) ;
581
- } ) ;
584
+ } ) ;
You can’t perform that action at this time.
0 commit comments