From 3d7e462f437e8587c21dc03ee4f63777526f4a65 Mon Sep 17 00:00:00 2001 From: ghostrigger Date: Fri, 8 Aug 2014 21:36:51 +0800 Subject: [PATCH] indentions * alignment for 432ee05e98269660457684322cb4feb949a68597 --- app/models/post.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/models/post.rb b/app/models/post.rb index 8abbc8a09..d66b27f96 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -385,14 +385,14 @@ class Post < ActiveRecord::Base "http://nijie.info/view.php?id=#{$1}" when %r{\Ahttps?://(?:o|image-proxy-origin)\.twimg\.com/\d/proxy\.jpg\?t=(\w+)&}i - str = Base64.decode64($1) - url = URI.extract(str, ['http', 'https']) - if (url[0] =~ /^https?:\/\/twitpic.com\/show\/large\/[a-z0-9]+/i) - url[0].gsub!(/show\/large\//, "") - index = url[0].rindex('.') - url[0] = url[0][0..index-1] - end - "#{url[0]}" + str = Base64.decode64($1) + url = URI.extract(str, ['http', 'https']) + if (url[0] =~ /^https?:\/\/twitpic.com\/show\/large\/[a-z0-9]+/i) + url[0].gsub!(/show\/large\//, "") + index = url[0].rindex('.') + url[0] = url[0][0..index-1] + end + "#{url[0]}" else source