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