Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Overwrite SyntaxHighlighter's url regexp to allow tildes
closes #1118.
  • Loading branch information
rwstauner committed Mar 9, 2014
1 parent 7074349 commit eafb8f2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions root/static/js/cpan.js
Expand Up @@ -61,6 +61,9 @@ $(document).ready(function () {
SyntaxHighlighter.defaults['quick-code'] = false;
SyntaxHighlighter.defaults['tab-size'] = 8;

// Allow tilde in url (#1118). Orig: /\w+:\/\/[\w-.\/?%&=:@;#]*/g,
SyntaxHighlighter.regexLib['url'] = /\w+:\/\/[\w-.\/?%&=:@;#~]*/g;

var source = $("#source");
// if this is a source-code view with destination anchor
if (source[0] && document.location.hash) {
Expand Down

0 comments on commit eafb8f2

Please sign in to comment.