diff --git a/astro/src/components/Help.tsx b/astro/src/components/Help.tsx index 917b5123c..b0674aeff 100644 --- a/astro/src/components/Help.tsx +++ b/astro/src/components/Help.tsx @@ -1,21 +1,19 @@ import styles from './Help.module.css' import { useState, useEffect } from 'preact/hooks' -import { Marked } from 'marked' +import { marked } from 'marked' import { loadCodeFromString } from '../lib/loadCodeFromString.ts' // import Prism from "prismjs"; -import hljs from 'highlight.js'; -import {markedHighlight} from "marked-highlight"; - -const marked = new Marked( - markedHighlight({ - langPrefix: 'hljs language-', - highlight(code, lang, info) { - const language = hljs.getLanguage(lang) ? lang : 'plaintext'; - return hljs.highlight(code, { language }).value; - } - }) -); +// import hljs from 'highlight.js'; +// import {markedHighlight} from "marked-highlight"; + +marked.setOptions({ + // highlight: function (code, language) { + + // const validLanguage = Prism.languages[language] ? language : 'markup' + // return Prism.highlight(code, Prism.languages[validLanguage], validLanguage) + // } +}) export default function Help({ toggleClose,