Skip to content

Commit 6e05ec4

Browse files
committed
Remove Admonition logic from remark-update-tags
Closes #94 The Admonition-related changes in `remark-update-tags` are already present in the docs, so there is no longer a need to perform this transformation.
1 parent fdd3a6c commit 6e05ec4

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

server/remark-update-tags.ts

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -62,29 +62,6 @@ export default function remarkMigrationUpdateTags(): Transformer {
6262
return index; // to traverse children
6363
}
6464

65-
// Notice and Admonition
66-
if (isMdxNode(node) && node.name === "Notice") {
67-
node.name = "Admonition";
68-
}
69-
70-
if (isMdxNode(node) && node.name === "Admonition") {
71-
const type = getAttribute(node, "type");
72-
73-
if (!type) {
74-
node.attributes.push({
75-
type: "mdxJsxAttribute",
76-
name: "type",
77-
value: "info",
78-
});
79-
} else {
80-
type.value = (type.value as string).toLowerCase();
81-
82-
if (type.value === "notice") {
83-
type.value = "note";
84-
}
85-
}
86-
}
87-
8865
// Unwrap Component
8966
if (
9067
isMdxNode(node) &&

0 commit comments

Comments
 (0)