Skip to content

Commit cb2dc47

Browse files
committed
Cosmetic: Remove https:// from github blob oneboxes.
1 parent 3c1174e commit cb2dc47

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

lib/onebox/engine/github_blob_onebox.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ def raw
4343
end
4444

4545
def data
46-
@data ||= {title: link, link: link, content: raw, truncated: @truncated}
46+
@data ||= {title: link.sub(/^https?\:\/\//, ''),
47+
link: link,
48+
content: raw,
49+
truncated: @truncated}
4750
end
4851
end
4952
end

templates/githubblob.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<h4><a href="{{link}}" target="_blank">{{link}}</a></h4>
1+
<h4><a href="{{link}}" target="_blank">{{title}}</a></h4>
22
<pre><code class='{{lang}}'>{{content}}</code></pre>
33

44
{{#truncated}}

0 commit comments

Comments
 (0)