From ce25bf8ef86e35bbd1907025d683c293ec96154f Mon Sep 17 00:00:00 2001 From: Jordan Bates Date: Tue, 30 Apr 2013 20:50:45 -0700 Subject: [PATCH] Better gist regex --- builds/4chan-X.js | 2 +- builds/4chan-X.user.js | 2 +- builds/crx/script.js | 2 +- src/Linkification/Linkify.coffee | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/builds/4chan-X.js b/builds/4chan-X.js index a03880712..069c482a2 100644 --- a/builds/4chan-X.js +++ b/builds/4chan-X.js @@ -4319,7 +4319,7 @@ } }, gist: { - regExp: /.*(?:gist.github.com\/.*\/)([^#\&\?]*).*/, + regExp: /.*(?:gist.github.com.*\/)([^\/][^\/]*)$/, el: function() { var div; diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index cfb50849c..468840593 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -4315,7 +4315,7 @@ } }, gist: { - regExp: /.*(?:gist.github.com\/.*\/)([^#\&\?]*).*/, + regExp: /.*(?:gist.github.com.*\/)([^\/][^\/]*)$/, el: function() { var div; diff --git a/builds/crx/script.js b/builds/crx/script.js index 4f869a85e..99b4b8d1f 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -4318,7 +4318,7 @@ } }, gist: { - regExp: /.*(?:gist.github.com\/.*\/)([^#\&\?]*).*/, + regExp: /.*(?:gist.github.com.*\/)([^\/][^\/]*)$/, el: function() { var div; diff --git a/src/Linkification/Linkify.coffee b/src/Linkification/Linkify.coffee index 2fc8ed524..9e11865fc 100644 --- a/src/Linkification/Linkify.coffee +++ b/src/Linkification/Linkify.coffee @@ -207,7 +207,7 @@ Linkify = src: "http://pastebin.com/embed_iframe.php?i=#{@name}" gist: - regExp: /.*(?:gist.github.com\/.*\/)([^#\&\?]*).*/ + regExp: /.*(?:gist.github.com.*\/)([^\/][^\/]*)$/ el: -> div = $.el 'iframe', # Github doesn't allow embedding straight from the site, so we use an external site to bypass that.