Skip to content

Commit

Permalink
Markdown extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
Smaug6739 committed Mar 31, 2024
1 parent 939516d commit 7d3a11f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dashboard/helpers/markdown/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@ import MarkdownIt from 'markdown-it';
import { containerPlugin } from './container';
import { anchorPlugin } from './anchor';
import { containerSvg } from './containers-svg';
// @ts-ignore
import underline from 'markdown-it-underline';
// @ts-ignore
import mark from 'markdown-it-mark';
import katex from 'katex';

const md = new MarkdownIt({ html: true });
md.use(containerPlugin);
md.use(anchorPlugin);
md.use(containerSvg);
md.use(underline);
md.use(mark);

export default function compile(str: string = '', plugins: boolean = true): string {
let render = str;
Expand Down
14 changes: 14 additions & 0 deletions dashboard/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
"@types/markdown-it": "^13.0.4",
"@types/markdown-it-container": "^2.0.8",
"@types/node": "^20.8.5",
"markdown-it-mark": "^4.0.0",
"markdown-it-underline": "^1.0.1",
"nuxt": "^3.8.0",
"pinia": "^2.1.6",
"punycode": "^2.3.0",
Expand Down

0 comments on commit 7d3a11f

Please sign in to comment.