lib/onebox/engine/github_blob_onebox.rb in onebox-1.8.85 vs lib/onebox/engine/github_blob_onebox.rb in onebox-1.8.86

- old
+ new

@@ -13,10 +13,10 @@ include Onebox::Mixins::GitBlobOnebox def raw_regexp /github\.com\/(?<user>[^\/]+)\/(?<repo>[^\/]+)\/blob\/(?<sha1>[^\/]+)\/(?<file>[^#]+)(#(L(?<from>[^-]*)(-L(?<to>.*))?))?/mi end def raw_template(m) - "https://raw.github.com/#{m[:user]}/#{m[:repo]}/#{m[:sha1]}/#{m[:file]}" + "https://raw.githubusercontent.com/#{m[:user]}/#{m[:repo]}/#{m[:sha1]}/#{m[:file]}" end def title Sanitize.fragment(URI.unescape(link).sub(/^https?\:\/\/github\.com\//, '')) end end