Skip to content

Commit

Permalink
chore: bump deps (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
deer authored Jan 12, 2024
1 parent 0c6447c commit b8c429c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
8 changes: 4 additions & 4 deletions deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@

export { emojify } from "https://deno.land/x/[email protected]/mod.ts";

export * as Marked from "https://esm.sh/marked@9.1.1?pin=v135";
export * as Marked from "https://esm.sh/marked@11.1.1?pin=v135";

export { default as GitHubSlugger } from "https://esm.sh/[email protected]?pin=v135";

export { default as markedAlert } from "https://esm.sh/[email protected]?pin=v135";

export { gfmHeadingId } from "https://esm.sh/[email protected].0?pin=v135";
export { gfmHeadingId } from "https://esm.sh/[email protected].2?pin=v135";

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

export { default as sanitizeHtml } from "https://esm.sh/sanitize-html@2.8.1?target=esnext&pin=v135";
export { default as sanitizeHtml } from "https://esm.sh/sanitize-html@2.11.0?target=esnext&pin=v135";

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

export { default as katex } from "https://esm.sh/[email protected].8/dist/katex.mjs?pin=v135";
export { default as katex } from "https://esm.sh/[email protected].9/dist/katex.mjs?pin=v135";
10 changes: 6 additions & 4 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class Renderer extends Marked.Renderer {
allowMath: boolean;
baseUrl: string | undefined;

constructor(options: Marked.marked.MarkedOptions & RenderOptions = {}) {
constructor(options: Marked.MarkedOptions & RenderOptions = {}) {
super(options);
this.baseUrl = options.baseUrl;
this.allowMath = options.allowMath ?? false;
Expand Down Expand Up @@ -126,11 +126,13 @@ export function render(markdown: string, opts: RenderOptions = {}): string {
gfm: true,
mangle: false,
renderer: opts.renderer ? opts.renderer : new Renderer(opts),
async: false,
};

const html = opts.inline
? Marked.marked.parseInline(markdown, marked_opts)
: Marked.marked.parse(markdown, marked_opts);
const html =
(opts.inline
? Marked.marked.parseInline(markdown, marked_opts)
: Marked.marked.parse(markdown, marked_opts)) as string;

if (opts.disableHtmlSanitization) {
return html;
Expand Down

0 comments on commit b8c429c

Please sign in to comment.