Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix for links with no href, who does that.

  • Loading branch information...
commit bf798334593c0618c5243b8cc0c2b4a26c912fd6 1 parent 80c784a
@nkpart authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/dget/github.rb
View
5 lib/dget/github.rb
@@ -40,8 +40,9 @@ def pages
def clean_links doc
# rewrites internal links to use the local navigation
doc.css('a').each do |some_a|
- some_a['href'][/#{@project_name}\/(.*)/, 1].fmap { |id|
- some_a['href'] = "javascript:go(\'#{id}\')"
+ some_a['href'].fmap { |href| href[/#{@project_name}\/(.*)/, 1].fmap { |id|
+ some_a['href'] = "javascript:go(\'#{id}\')"
+ }
}
end
end

0 comments on commit bf79833

Please sign in to comment.
Something went wrong with that request. Please try again.