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