UNPKG

@redocly/graphql-docs

Version:

Redocly GraphQL docs

2 lines (1 loc) 420 B
import{marked as a,Renderer as o}from"marked";const n=new o;n.heading=function(e,r){return`<h${r} class="md">${e}</h${r}>`},n.list=function(e,r){const t=r?"ol":"ul";return`<${t} class="md">${e}</${t}>`},n.table=function(e,r){return`<table class="md"><thead>${e}</thead><tbody>${r}</tbody></table>`};function s(e){const r={...e?{highlight:e}:{},renderer:n};return t=>a.parse(t,r)}export{s as createMarkdownParserMarked};