From ff9d2c7f7a9653006473ff3ca96b4121988104bc Mon Sep 17 00:00:00 2001 From: Andy Zhao Date: Tue, 11 Sep 2018 13:29:28 -0400 Subject: [PATCH] Update gist tag regex (#628) --- app/liquid_tags/gist_tag.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/liquid_tags/gist_tag.rb b/app/liquid_tags/gist_tag.rb index 159661ac5..1b38c4792 100644 --- a/app/liquid_tags/gist_tag.rb +++ b/app/liquid_tags/gist_tag.rb @@ -38,7 +38,7 @@ class GistTag < LiquidTagBase end def valid_link?(link) - (link =~ /^https\:\/\/gist\.github\.com\/([a-zA-Z0-9\-]){1,39}\/([a-zA-Z0-9]){32}\s$/)&. + (link =~ /\Ahttps\:\/\/gist\.github\.com\/([a-zA-Z0-9\-]){1,39}\/([a-zA-Z0-9]){32}\s\Z/)&. zero? end end