make pastebin embedding work when link is to raw version or other page using ?i=

This commit is contained in:
ccd0 2014-06-08 10:17:45 -07:00
parent db15797639
commit 42468dd5c6

View File

@ -312,7 +312,7 @@ Linkify =
el
,
key: 'pastebin'
regExp: /.*(?:pastebin.com\/(?!u\/))([^#\&\?]*).*/
regExp: /.*pastebin\.com\/(?!u\/)(?:[\w\.]+\?i\=)?(\w+).*/
el: (a) ->
div = $.el 'iframe',
src: "http://pastebin.com/embed_iframe.php?i=#{a.dataset.uid}"