Skip to content

Commit

Permalink
docs(cn): translate asides
Browse files Browse the repository at this point in the history
  • Loading branch information
Yucohny committed Nov 20, 2023
1 parent 7c16cbd commit 75d8b99
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/remark-plugins/remark-custom-asides/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
*/

import { visit } from 'unist-util-visit';

const asideMapping = {
tip: '提示',
warning: '警告',
todo: 'TODO'
}

export default function customAsides(
options = {
mapping: {},
Expand Down Expand Up @@ -49,7 +56,7 @@ export default function customAsides(
children: [
{
type: 'text',
value: `${className}`,
value: `${asideMapping[className]}`,
},
],
},
Expand Down

0 comments on commit 75d8b99

Please sign in to comment.