fix nil commentary case for pixiv strategy #3948
This commit is contained in:
@@ -26,6 +26,10 @@ module Sources
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.to_dtext(text)
|
def self.to_dtext(text)
|
||||||
|
if text.nil?
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
text = text.gsub(%r!https?://www\.pixiv\.net/member_illust\.php\?mode=medium&illust_id=([0-9]+)!i) do |match|
|
text = text.gsub(%r!https?://www\.pixiv\.net/member_illust\.php\?mode=medium&illust_id=([0-9]+)!i) do |match|
|
||||||
pixiv_id = $1
|
pixiv_id = $1
|
||||||
%(pixiv ##{pixiv_id} "»":[/posts?tags=pixiv:#{pixiv_id}])
|
%(pixiv ##{pixiv_id} "»":[/posts?tags=pixiv:#{pixiv_id}])
|
||||||
|
|||||||
Reference in New Issue
Block a user