Skip to content

Commit

Permalink
feat: import highlight core only (#402)
Browse files Browse the repository at this point in the history
* feat: import highlight core only

* feat: improve Hljs types
  • Loading branch information
HaydenOrz committed Nov 2, 2023
1 parent 35169b4 commit b283772
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/markdownRender/extensions/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import hljs from 'highlight.js';
import type * as Hljs from 'highlight.js';
import hljsCore from 'highlight.js/lib/core';
import sql from 'highlight.js/lib/languages/sql';
import showdown from 'showdown';

import 'highlight.js/styles/default.css';
import '../theme/vs.scss';
import '../theme/vs-dark.scss';

const hljs = hljsCore as typeof Hljs;

hljs.registerLanguage('sql', sql);

export default function sqlHighlightExtension(): showdown.ShowdownExtension {
Expand Down

0 comments on commit b283772

Please sign in to comment.