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 ) {
4646 rmozilla = / ( m o z i l l a ) (?: .* ? r v : ( [ \w . ] + ) ) ? / ,
4747
4848 // Matches dashed string for camelizing
49- rdashAlpha = / - ( [ a - z ] ) / ig,
49+ rdashAlpha = / - ( [ a - z ] | [ 0 - 9 ] ) / ig,
5050
5151 // Used by jQuery.camelCase as callback to replace()
5252 fcamelCase = function ( all , letter ) {
53- return letter . toUpperCase ( ) ;
53+ return ( letter + "" ) . toUpperCase ( ) ;
5454 } ,
5555
5656 // 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
538538 "an-object" : { } ,
539539 "bool-true" : true ,
540540 "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
542545 } ;
543546
544- expect ( 18 ) ;
547+ expect ( 24 ) ;
545548
546549 jQuery . each ( datas , function ( key , val ) {
547550 div . data ( key , val ) ;
@@ -578,4 +581,4 @@ test("jQuery.data supports interoperable removal of hyphenated/camelCase propert
578581 equal ( div . data ( key ) , undefined , "get: " + key ) ;
579582
580583 } ) ;
581- } ) ;
584+ } ) ;
You can’t perform that action at this time.
0 commit comments