Skip to content

Commit 75d8b99

Browse files
committed
docs(cn): translate asides
1 parent 7c16cbd commit 75d8b99

File tree

1 file changed

+8
-1
lines changed
  • src/remark-plugins/remark-custom-asides

1 file changed

+8
-1
lines changed

src/remark-plugins/remark-custom-asides/index.mjs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
*/
44

55
import { visit } from 'unist-util-visit';
6+
7+
const asideMapping = {
8+
tip: '提示',
9+
warning: '警告',
10+
todo: 'TODO'
11+
}
12+
613
export default function customAsides(
714
options = {
815
mapping: {},
@@ -49,7 +56,7 @@ export default function customAsides(
4956
children: [
5057
{
5158
type: 'text',
52-
value: `${className}`,
59+
value: `${asideMapping[className]}`,
5360
},
5461
],
5562
},

0 commit comments

Comments
 (0)