From da1bfc3eb4f98717e34cf5145debac657aedafbd Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 30 Apr 2016 10:22:40 -0700 Subject: [PATCH] Don't try to embed links to Gists without username. It causes unwanted title/embedding for links to the list of a user's Gists, which is much more common. --- src/Linkification/Embedding.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Linkification/Embedding.coffee b/src/Linkification/Embedding.coffee index 5453e0e62..3f98555c5 100644 --- a/src/Linkification/Embedding.coffee +++ b/src/Linkification/Embedding.coffee @@ -187,7 +187,7 @@ Embedding = text: (_) -> _.title , key: 'Gist' - regExp: /^\w+:\/\/gist\.github\.com\/(?:[\w\-]+\/)?(\w+)/ + regExp: /^\w+:\/\/gist\.github\.com\/[\w\-]+\/(\w+)/ el: (a) -> el = $.el 'iframe' el.setAttribute 'sandbox', 'allow-scripts'