Skip to content

Commit

Permalink
import all languagues from hightlight
Browse files Browse the repository at this point in the history
  • Loading branch information
ettoreleandrotognoli committed Jun 28, 2023
1 parent 117cddf commit fc3090c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions js/packages/quiz/src/components/snippet.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
import * as rustEditor from "@wcrichto/rust-editor";
import type { monaco } from "@wcrichto/rust-editor";
//@ts-ignore
import hljs from "highlight.js/lib/core";
//@ts-ignore
import rust from "highlight.js/lib/languages/rust";
import hljs from "highlight.js";
//@ts-ignore
import lean from "highlightjs-lean";
import React, { useContext, useEffect, useRef } from "react";
import ReactDOM from "react-dom/client";

// This reduces bundle size by not including a bunch of extra languages
hljs.registerLanguage("rust", rust);
hljs.registerLanguage("lean", lean);

export let DefaultLanguageContext = React.createContext<string | undefined>(
Expand Down

0 comments on commit fc3090c

Please sign in to comment.