Sha256: f72ba48f1051c597dde94bc02ba981e6edf1f46d7d018a3dcc664da8a622387e

Contents?: true

Size: 833 Bytes

Versions: 6

Compression:

Stored size: 833 Bytes

Contents

!function(){if(self.Prism){var i=/\b([a-z]{3,7}:\/\/|tel:)[\w\-+%~/.:#=?&]+/,n=/\b\S+@[\w.]+[a-z]{2}/,t=/\[([^\]]+)]\(([^)]+)\)/,e=["comment","url","attr-value","string"];for(var a in Prism.languages){var r=Prism.languages[a];Prism.languages.DFS(r,function(a,r,l){e.indexOf(l)>-1&&"Array"!==Prism.util.type(r)&&(r.pattern||(r=this[a]={pattern:r}),r.inside=r.inside||{},"comment"==l&&(r.inside["md-link"]=t),"attr-value"==l?Prism.languages.insertBefore("inside","punctuation",{"url-link":i},r):r.inside["url-link"]=i,r.inside["email-link"]=n)}),r["url-link"]=i,r["email-link"]=n}Prism.hooks.add("wrap",function(i){if(/-link$/.test(i.type)){i.tag="a";var n=i.content;if("email-link"==i.type&&0!=n.indexOf("mailto:"))n="mailto:"+n;else if("md-link"==i.type){var e=i.content.match(t);n=e[2],i.content=e[1]}i.attributes.href=n}})}}();

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
polymer-elements-rails-1.0.1 app/assets/components/prism/plugins/autolinker/prism-autolinker.min.js
polymer-elements-rails-1.0.0 app/assets/components/prism/plugins/autolinker/prism-autolinker.min.js
polymer-elements-rails-1.0.0.pre.rc.1 app/assets/components/prism/plugins/autolinker/prism-autolinker.min.js
polymer-iron-rails-1.0.0.pre.rc.3 app/assets/components/prism/plugins/autolinker/prism-autolinker.min.js
polymer-iron-rails-1.0.0.pre.rc.2 app/assets/components/prism/plugins/autolinker/prism-autolinker.min.js
polymer-iron-rails-1.0.0.pre.rc.1 app/assets/components/prism/plugins/autolinker/prism-autolinker.min.js