diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2018-08-01 10:55:59 +0200 |
---|---|---|
committer | Hakim El Hattab <hakim.elhattab@gmail.com> | 2018-08-01 10:55:59 +0200 |
commit | 249f0139598b20d02263b81a76f1ff87f8e74225 (patch) | |
tree | a7a9ce3db87b9966b262fe6484fe3d366dbc08a7 /js | |
parent | 2c5396b7d347f8ee1344016f15b93d4f78401569 (diff) | |
download | perl-software-in-gnu-guix-249f0139598b20d02263b81a76f1ff87f8e74225.tar perl-software-in-gnu-guix-249f0139598b20d02263b81a76f1ff87f8e74225.tar.gz |
fix detection of named links (closes #1655)
Diffstat (limited to 'js')
-rw-r--r-- | js/reveal.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/js/reveal.js b/js/reveal.js index eaa9d60..3c31b97 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3966,9 +3966,9 @@ var bits = hash.slice( 2 ).split( '/' ), name = hash.replace( /#|\//gi, '' ); - // If the first bit is invalid and there is a name we can - // assume that this is a named link - if( isNaN( parseInt( bits[0], 10 ) ) && name.length ) { + // If the first bit is not fully numeric and there is a name we + // can assume that this is a named link + if( !/^[0-9]*$/.test( bits[0] ) && name.length ) { var element; // Ensure the named link is a valid HTML ID attribute |