Skip to content

Commit 0efffda

Browse files
committed
chore: add comments
1 parent 8d71865 commit 0efffda

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/markdown-it.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,28 @@ import type Token from 'markdown-it/lib/token.mjs'
33
import container from 'markdown-it-container'
44

55
export interface CSSI18nOptions {
6+
/**
7+
* Languages to support
8+
* @default ['zh-CN', 'en']
9+
*/
610
languages?: string[]
711
}
812

13+
/**
14+
* Add a container to markdown-it to support i18n
15+
* @example
16+
* ```markdown
17+
* ::: zh-CN
18+
* 你好
19+
* :::
20+
*
21+
* ::: en
22+
* Hello
23+
* :::
24+
* ```
25+
* @param md
26+
* @param options
27+
*/
928
export function cssI18nContainer(md: MarkdownIt, options: CSSI18nOptions = {}) {
1029
const languages = options.languages || ['zh-CN', 'en']
1130

0 commit comments

Comments
 (0)