"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[9268],{79268:(e,t,i)=>{i.r(t),i.d(t,{default:()=>l});var r=i(4844),n=i(46142),a=i(54262);const l={id:"@jupyterlab/markedparser-extension:plugin",autoStart:!0,provides:n.IMarkdownParser,requires:[r.IEditorLanguageRegistry],activate:(e,t)=>(s.initializeMarked(t),{render:e=>new Promise(((t,i)=>{(0,a.marked)(e,((e,r)=>{e?i(e):t(r)}))}))})};var s;!function(e){let t=!1;e.initializeMarked=function(e){t||(t=!0,a.marked.setOptions({gfm:!0,sanitize:!1,langPrefix:"language-",highlight:(t,i,r)=>{const n=(e,t)=>(r&&r(e,t),t);if(!i)return n(null,t);const a=document.createElement("div");try{e.highlight(t,e.findBest(i),a).then((()=>n(null,a.innerHTML))).catch((e=>n(e,t)))}catch(e){return console.error(`Failed to highlight ${i} code`,e),n(e,t)}}}))}}(s||(s={}))}}]);