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 @@ -

Alerts

-

Note

+

Alerts

+

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.

diff --git a/test/fixtures/basic.html b/test/fixtures/basic.html index 48a114c..e97dbdb 100644 --- a/test/fixtures/basic.html +++ b/test/fixtures/basic.html @@ -1,4 +1,4 @@ -

Heading