fix detection of named links (closes #1655)
This commit is contained in:
		| @@ -3966,9 +3966,9 @@ | |||||||
| 		var bits = hash.slice( 2 ).split( '/' ), | 		var bits = hash.slice( 2 ).split( '/' ), | ||||||
| 			name = hash.replace( /#|\//gi, '' ); | 			name = hash.replace( /#|\//gi, '' ); | ||||||
|  |  | ||||||
| 		// If the first bit is invalid and there is a name we can | 		// If the first bit is not fully numeric and there is a name we | ||||||
| 		// assume that this is a named link | 		// can assume that this is a named link | ||||||
| 		if( isNaN( parseInt( bits[0], 10 ) ) && name.length ) { | 		if( !/^[0-9]*$/.test( bits[0] ) && name.length ) { | ||||||
| 			var element; | 			var element; | ||||||
|  |  | ||||||
| 			// Ensure the named link is a valid HTML ID attribute | 			// Ensure the named link is a valid HTML ID attribute | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user