mirror of https://github.com/vuejs/vitepress
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
766 B
24 lines
766 B
diff --git a/index.d.ts b/index.d.ts
|
|
index 41d4a858c6ece5a61a2088733cf8b333b45603d8..2cb19bcd8fc76ae82ebe87af742916e17f49334b 100644
|
|
--- a/index.d.ts
|
|
+++ b/index.d.ts
|
|
@@ -1,3 +1,15 @@
|
|
-import MarkdownIt = require("markdown-it");
|
|
-declare function attrs(md: MarkdownIt): void;
|
|
-export = attrs;
|
|
+import type MarkdownIt from 'markdown-it'
|
|
+
|
|
+export interface MarkdownItAttrsOptions {
|
|
+ /** left delimiter, default is `{`(left curly bracket) */
|
|
+ leftDelimiter?: string
|
|
+ /** right delimiter, default is `}`(right curly bracket) */
|
|
+ rightDelimiter?: string
|
|
+ /** rule of allowed attribute, empty means no limit */
|
|
+ allowedAttributes?: (string | RegExp)[]
|
|
+}
|
|
+
|
|
+export default function attrsPlugin(
|
|
+ md: MarkdownIt,
|
|
+ options?: MarkdownItAttrsOptions
|
|
+): void
|