Updates marked to v5.0

Disables some of the deprecated options to avoid the console warnings.
Removes obfuscation of plain-text emails.

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
This commit is contained in:
Sebastian Martinez
2023-05-08 10:35:24 +02:00
parent 233517aa6e
commit 03c05edeca
5 changed files with 22 additions and 8 deletions
+6 -1
View File
@@ -8,7 +8,12 @@
export let content: string;
export let fontSize: "small" | "medium" = "small";
marked.use({ renderer });
marked.use({
renderer,
// TODO: Disables deprecated options, remove once removed from marked
mangle: false,
headerIds: false,
});
const render = (content: string): string =>
// eslint-disable-next-line @typescript-eslint/naming-convention
+7 -1
View File
@@ -23,7 +23,13 @@
$: frontMatter = Object.entries(doc.data).filter(
([, val]) => typeof val === "string" || typeof val === "number",
);
marked.use({ extensions, renderer });
marked.use({
extensions,
renderer,
// TODO: Disables deprecated options, remove once removed from marked
mangle: false,
headerIds: false,
});
let container: HTMLElement;