Skip to content

Commit 7b601b8

Browse files
authored
Merge pull request #25 from zenovak/main
fix: remove case sensitivity
2 parents 8253cf8 + 3055d42 commit 7b601b8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ const REGEX = /^\[\!(\w+)\]([+-]?)/;
175175
* @returns {boolean}
176176
*/
177177
function containsKey(obj: Callout, str: string): boolean {
178-
return Object.keys(obj).includes(str);
178+
return Object.keys(obj).includes(str.toLowerCase());
179179
}
180180

181181
/**
@@ -239,7 +239,7 @@ const plugin: Plugin = (customConfig?: Partial<Config>) => {
239239
value: `
240240
<div class="${titleClass}">
241241
<${iconTagName} class="${iconClass}">${
242-
callouts[calloutType]
242+
callouts[calloutType.toLowerCase()]
243243
}</${iconTagName}>
244244
${
245245
title &&
@@ -259,7 +259,7 @@ const plugin: Plugin = (customConfig?: Partial<Config>) => {
259259
node.data = {
260260
hProperties: {
261261
...((node.data && node.data.hProperties) || {}),
262-
className: blockquoteClass || `${dataAttribute}-${calloutType}`,
262+
className: blockquoteClass || `${dataAttribute}-${calloutType.toLowerCase()}`,
263263
[`data-${dataAttribute}`]: calloutType,
264264
"data-expandable": String(dataExpandable),
265265
"data-expanded": String(dataExpanded),

0 commit comments

Comments
 (0)