diff --git a/mod.ts b/mod.ts index cc24c8f..ecc431d 100644 --- a/mod.ts +++ b/mod.ts @@ -275,7 +275,7 @@ export function render(markdown: string, opts: RenderOptions = {}): string { "aria-label", "aria-describedby", ], - svg: ["viewbox", "width", "height", "aria-hidden", "background"], + svg: ["viewBox", "width", "height", "aria-hidden", "background"], path: ["fill-rule", "d"], circle: ["cx", "cy", "r", "stroke", "stroke-width", "fill", "alpha"], span: opts.allowMath ? ["aria-hidden", "style"] : [], @@ -306,6 +306,9 @@ export function render(markdown: string, opts: RenderOptions = {}): string { ), allowedClasses: { ...defaultAllowedClasses, ...opts.allowedClasses }, allowProtocolRelative: false, + parser: { + lowerCaseAttributeNames: false, + }, }); } diff --git a/test/fixtures/alerts.html b/test/fixtures/alerts.html index 631ff35..f907fd3 100644 --- a/test/fixtures/alerts.html +++ b/test/fixtures/alerts.html @@ -1,21 +1,21 @@ -
Note
+Note
Highlights information that users should take into account, even when skimming.
Tip
+Tip
Optional information to help a user be more successful.
Important
+Important
Crucial information necessary for users to succeed.
Warning
+Warning
Critical content demanding immediate user attention due to potential risks.
Caution
+Caution
Negative potential consequences of an action.
Here is a simple footnote1. +
Here is a simple footnote1.
diff --git a/test/test.ts b/test/test.ts
index 5043ec3..ded57b2 100644
--- a/test/test.ts
+++ b/test/test.ts
@@ -144,6 +144,14 @@ Deno.test("Media URL transformation without base URL", () => {
assertEquals(html, expectedWithoutTransformation);
});
+Deno.test("simple img test", () => {
+ const markdown = "![asdf](image.jpg)";
+ const result = `
tofu