Skip to content

Commit

Permalink
fix: use marked-mangle (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
lino-levan authored Jul 4, 2023
1 parent 8a3481e commit d554ced
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
10 changes: 6 additions & 4 deletions deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@
/// <reference lib="deno.ns" />
/// <reference lib="deno.unstable" />

export { emojify } from "https://deno.land/x/emoji@0.2.1/mod.ts";
export { emojify } from "https://deno.land/x/emoji@0.3.0/mod.ts";

export * as Marked from "https://esm.sh/marked@5.0.1";
export * as Marked from "https://esm.sh/marked@5.1.0/";

export { gfmHeadingId } from "https://esm.sh/[email protected]";
export { mangle } from "https://esm.sh/[email protected]/";

export { gfmHeadingId } from "https://esm.sh/[email protected]/";

export { default as Prism } from "https://esm.sh/[email protected]";

export { default as sanitizeHtml } from "https://esm.sh/[email protected]?target=esnext";

export { escape as htmlEscape } from "https://esm.sh/[email protected]";

export { default as katex } from "https://esm.sh/[email protected].4/dist/katex.mjs";
export { default as katex } from "https://esm.sh/[email protected].8/dist/katex.mjs";
2 changes: 1 addition & 1 deletion example/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { serve } from "https://deno.land/std@0.177.0/http/server.ts";
import { serve } from "https://deno.land/std@0.192.0/http/server.ts";

import { CSS, KATEX_CSS, render } from "../mod.ts";

Expand Down
2 changes: 2 additions & 0 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ import {
gfmHeadingId,
htmlEscape,
katex,
mangle,
Marked,
Prism,
sanitizeHtml,
} from "./deps.ts";
import { CSS, KATEX_CLASSES, KATEX_CSS } from "./style.js";
export { CSS, KATEX_CSS, Marked };

Marked.marked.use(mangle());
Marked.marked.use(gfmHeadingId());

class Renderer extends Marked.Renderer {
Expand Down

0 comments on commit d554ced

Please sign in to comment.