@@ -16,17 +16,17 @@ See a [demo as JSFiddle](https://jsfiddle.net/9ukc8dy6/).
16
16
17
17
The ` opts ` object can contain:
18
18
19
- Name | Description | Default
20
- ------------------|-----------------------------------------------|- -----------------------------------
21
- ` level ` | Minimum level to apply anchors on. | 1
22
- ` slugify ` | A custom slugification function. | [ string.js' ` slugify ` ] [ slugify ]
23
- ` permalink ` | Whether to add permalinks next to titles. | ` false `
24
- ` renderPermalink ` | A custom permalink rendering function. | See [ ` index.es6.js ` ] ( index.es6.js )
25
- ` permalinkClass ` | The class of the permalink anchor. | ` header-anchor `
26
- ` permalinkSymbol ` | The symbol in the permalink anchor. | ` ¶ `
27
- ` permalinkBefore ` | Place the permalink before the title. | ` false `
28
- ` permalinkHref ` | A custom permalink ` href ` rendering function. | See [ ` index.es6.js ` ] ( index.es6.js )
29
- ` callback ` | Called with token and info after rendering. | ` undefined `
19
+ Name | Description | Default
20
+ ------------------|----------------------------------------------------------------| -----------------------------------
21
+ ` level ` | Minimum level to apply anchors on or array of selected levels. | 1
22
+ ` slugify ` | A custom slugification function. | [ string.js' ` slugify ` ] [ slugify ]
23
+ ` permalink ` | Whether to add permalinks next to titles. | ` false `
24
+ ` renderPermalink ` | A custom permalink rendering function. | See [ ` index.es6.js ` ] ( index.es6.js )
25
+ ` permalinkClass ` | The class of the permalink anchor. | ` header-anchor `
26
+ ` permalinkSymbol ` | The symbol in the permalink anchor. | ` ¶ `
27
+ ` permalinkBefore ` | Place the permalink before the title. | ` false `
28
+ ` permalinkHref ` | A custom permalink ` href ` rendering function. | See [ ` index.es6.js ` ] ( index.es6.js )
29
+ ` callback ` | Called with token and info after rendering. | ` undefined `
30
30
31
31
[ slugify ] : http://stringjs.com/#methods/slugify
32
32
@@ -35,8 +35,12 @@ the above options, and then all the usual markdown-it rendering
35
35
arguments.
36
36
37
37
All headers above ` level ` will then have an ` id ` attribute with a slug
38
- of their content, and if ` permalink ` is ` true ` , a ` ¶ ` symbol linking to
39
- the header itself.
38
+ of their content. ` level ` can also be an array of headers levels to
39
+ apply the anchor, like ` [2, 3] ` to have an anchor on only level 2 and
40
+ 3 headers.
41
+
42
+ If ` permalink ` is ` true ` , a ` ¶ ` symbol linking to the header itself will
43
+ be added.
40
44
41
45
You may want to use the [ link symbol] ( http://graphemica.com/🔗 ) as
42
46
` permalinkSymbol ` , or a symbol from your favorite web font.
0 commit comments