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.
This commit is contained in:
ccd0 2016-04-30 10:22:40 -07:00
parent d69e6d996d
commit da1bfc3eb4

View File

@ -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'