remove trailing whitespaces ❤️

This commit is contained in:
Gosha Arinich
2013-02-25 19:42:20 +03:00
parent b50e0536c7
commit cafc75b238
383 changed files with 4220 additions and 2221 deletions

View File

@ -6,7 +6,7 @@ module Oneboxer
matcher /github\.com\/[^\/]+\/[^\/]+\/blob\/.*/
favicon 'github.png'
def translate_url
def translate_url
m = @url.match(/github\.com\/(?<user>[^\/]+)\/(?<repo>[^\/]+)\/blob\/(?<sha1>[^\/]+)\/(?<file>[^#]+)(#(L(?<from>[^-]*)(-L(?<to>.*))?))?/mi)
if m
@from = (m[:from] || -1).to_i
@ -19,7 +19,7 @@ module Oneboxer
def parse(data)
if @from > 0
if @from > 0
if @to < 0
@from = @from - 10
@to = @from + 20
@ -42,7 +42,7 @@ module Oneboxer
truncated = true
end
{content: data, truncated: truncated}
{content: data, truncated: truncated}
end
end