Skip to content

Commit

Permalink
removed syntax highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
leomcelroy committed Dec 21, 2023
1 parent 4d6ac45 commit 6701603
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions astro/src/components/Help.tsx
Original file line number Diff line number Diff line change
@@ -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,
Expand Down

1 comment on commit 6701603

@vercel
Copy link

@vercel vercel bot commented on 6701603 Dec 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

blot – ./astro

blot-git-main.hackclub.dev
blot.hackclub.dev

Please sign in to comment.