spaCy/website/assets/js/vendor/vue-markdown.min.js

7 lines
536 KiB
JavaScript
Raw Normal View History

💫 Interactive code examples, spaCy Universe and various docs improvements (#2274) * Integrate Python kernel via Binder * Add live model test for languages with examples * Update docs and code examples * Adjust margin (if not bootstrapped) * Add binder version to global config * Update terminal and executable code mixins * Pass attributes through infobox and section * Hide v-cloak * Fix example * Take out model comparison for now * Add meta text for compat * Remove chart.js dependency * Tidy up and simplify JS and port big components over to Vue * Remove chartjs example * Add Twitter icon * Add purple stylesheet option * Add utility for hand cursor (special cases only) * Add transition classes * Add small option for section * Add thumb object for small round thumbnail images * Allow unset code block language via "none" value (workaround to still allow unset language to default to DEFAULT_SYNTAX) * Pass through attributes * Add syntax highlighting definitions for Julia, R and Docker * Add website icon * Remove user survey from navigation * Don't hide GitHub icon on small screens * Make top navigation scrollable on small screens * Remove old resources page and references to it * Add Universe * Add helper functions for better page URL and title * Update site description * Increment versions * Update preview images * Update mentions of resources * Fix image * Fix social images * Fix problem with cover sizing and floats * Add divider and move badges into heading * Add docstrings * Reference converting section * Add section on converting word vectors * Move converting section to custom section and fix formatting * Remove old fastText example * Move extensions content to own section Keep weird ID to not break permalinks for now (we don't want to rewrite URLs if not absolutely necessary) * Use better component example and add factories section * Add note on larger model * Use better example for non-vector * Remove similarity in context section Only works via small models with tensors so has always been kind of confusing * Add note on init-model command * Fix lightning tour examples and make excutable if possible * Add spacy train CLI section to train * Fix formatting and add video * Fix formatting * Fix textcat example description (resolves #2246) * Add dummy file to try resolve conflict * Delete dummy file * Tidy up [ci skip] * Ensure sufficient height of loading container * Add loading animation to universe * Update Thebelab build and use better startup message * Fix asset versioning * Fix typo [ci skip] * Add note on project idea label
2018-04-29 03:06:46 +03:00
/**
* vue-markdown v2.2.4
* https://github.com/miaolz123/vue-markdown
* MIT License
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VueMarkdown=t():e.VueMarkdown=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.install=function(e){e.component("vue-markdown",n.default)};var n=function(e){return e&&e.__esModule?e:{default:e}}(r(1))},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(2)),i=n(r(55)),a=n(r(59)),s=n(r(127)),l=n(r(133)),u=n(r(134)),c=n(r(135)),p=n(r(136)),h=n(r(137)),f=n(r(138)),d=n(r(139)),m=n(r(140)),g=n(r(153)),_=n(r(177));t.default={md:new a.default,template:"<div><slot></slot></div>",data:function(){return{sourceData:this.source}},props:{watches:{type:Array,default:function(){return["source","show","toc"]}},source:{type:String,default:""},show:{type:Boolean,default:!0},highlight:{type:Boolean,default:!0},html:{type:Boolean,default:!0},xhtmlOut:{type:Boolean,default:!0},breaks:{type:Boolean,default:!0},linkify:{type:Boolean,default:!0},emoji:{type:Boolean,default:!0},typographer:{type:Boolean,default:!0},langPrefix:{type:String,default:"language-"},quotes:{type:String,default:"“”‘’"},tableClass:{type:String,default:"table"},taskLists:{type:Boolean,default:!0},toc:{type:Boolean,default:!1},tocId:{type:String},tocClass:{type:String,default:"table-of-contents"},tocFirstLevel:{type:Number,default:2},tocLastLevel:{type:Number},tocAnchorLink:{type:Boolean,default:!0},tocAnchorClass:{type:String,default:"toc-anchor"},tocAnchorLinkSymbol:{type:String,default:"#"},tocAnchorLinkSpace:{type:Boolean,default:!0},tocAnchorLinkClass:{type:String,default:"toc-anchor-link"},anchorAttributes:{type:Object,default:function(){return{}}},prerender:{type:Function,default:function(e){return e}},postrender:{type:Function,default:function(e){return e}}},computed:{tocLastLevelComputed:function(){return this.tocLastLevel>this.tocFirstLevel?this.tocLastLevel:this.tocFirstLevel+1}},render:function(e){var t=this;this.md=(new a.default).use(l.default).use(u.default).use(c.default).use(p.default).use(h.default).use(f.default).use(d.default).use(g.default,{throwOnError:!1,errorColor:" #cc0000"}).use(_.default,{enabled:this.taskLists}),this.emoji&&this.md.use(s.default),this.md.set({html:this.html,xhtmlOut:this.xhtmlOut,breaks:this.breaks,linkify:this.linkify,typographer:this.typographer,langPrefix:this.langPrefix,quotes:this.quotes}),this.md.renderer.rules.table_open=function(){return'<table class="'+t.tableClass+'">\n'};var r=this.md.renderer.rules.link_open||function(e,t,r,n,o){return o.renderToken(e,t,r)};this.md.renderer.rules.link_open=function(e,n,o,a,s){return(0,i.default)(t.anchorAttributes).map(function(r){var o=e[n].attrIndex(r),i=t.anchorAttributes[r];o<0?e[n].attrPush([r,i]):e[n].attrs[o][1]=i}),r(e,n,o,a,s)},this.toc&&this.md.use(m.default,{tocClassName:this.tocClass,tocFirstLevel:this.tocFirstLevel,tocLastLevel:this.tocLastLevelComputed,anchorLink:this.tocAnchorLink,anchorLinkSymbol:this.tocAnchorLinkSymbol,anchorLinkSpace:this.tocAnchorLinkSpace,anchorClassName:this.tocAnchorClass,anchorLinkSymbolClassName:this.tocAnchorLinkClass,tocCallback:function(e,r,n){n&&(t.tocId&&document.getElementById(t.tocId)&&(document.getElementById(t.tocId).innerHTML=n),t.$emit("toc-rendered",n))}});var n=this.show?this.md.render(this.prerender(this.sourceData)):"";return n=this.postrender(n),this.$emit("rendered",n),e("div",{domProps:{innerHTML:n}})},beforeMount:function(){var e=this;if(this.$slots.default){this.sourceData="";var t=!0,r=!1,n=void 0;try{for(var i,a=(0,o.default)(this.$slots.default);!(t=(i=a.next()).done);t=!0){var s=i.value;this.sourceData+=s.text}}catch(e){r=!0,n=e}finally{try{!t&&a.return&&a.return()}finally{if(r)throw n}}}this.$watch("source"