File tree 3 files changed +8
-13
lines changed
3 files changed +8
-13
lines changed Original file line number Diff line number Diff line change 79
79
"gray-matter" : " ^4.0.3" ,
80
80
"lru-cache" : " ^6.0.0" ,
81
81
"markdown-it" : " ^12.0.6" ,
82
- "markdown-it-anchor" : " ^7 .1.0 " ,
82
+ "markdown-it-anchor" : " ^8 .1.2 " ,
83
83
"markdown-it-container" : " ^3.0.0" ,
84
84
"markdown-it-emoji" : " ^2.0.0" ,
85
85
"markdown-it-table-of-contents" : " ^0.5.2" ,
Original file line number Diff line number Diff line change @@ -12,18 +12,16 @@ import { preWrapperPlugin } from './plugins/preWrapper'
12
12
import { linkPlugin } from './plugins/link'
13
13
import { extractHeaderPlugin } from './plugins/header'
14
14
import { Header } from '../shared'
15
+ import anchor , { AnchorOptions } from 'markdown-it-anchor'
15
16
16
17
const emoji = require ( 'markdown-it-emoji' )
17
- const anchor = require ( 'markdown-it-anchor' )
18
18
const toc = require ( 'markdown-it-table-of-contents' )
19
19
20
20
export interface MarkdownOptions extends MarkdownIt . Options {
21
21
lineNumbers ?: boolean
22
22
config ?: ( md : MarkdownIt ) => void
23
23
anchor ?: {
24
- permalink ?: boolean
25
- permalinkBefore ?: boolean
26
- permalinkSymbol ?: string
24
+ permalink ?: AnchorOptions [ 'permalink' ]
27
25
}
28
26
// https://github.com/Oktavilla/markdown-it-table-of-contents
29
27
toc ?: any
@@ -70,10 +68,7 @@ export const createMarkdownRenderer = (
70
68
. use ( emoji )
71
69
. use ( anchor , {
72
70
slugify,
73
- permalink : true ,
74
- permalinkBefore : true ,
75
- permalinkSymbol : '#' ,
76
- permalinkAttrs : ( ) => ( { 'aria-hidden' : true } ) ,
71
+ permalink : anchor . permalink . ariaHidden ( { } ) ,
77
72
...options . anchor
78
73
} )
79
74
. use ( toc , {
Original file line number Diff line number Diff line change @@ -3600,10 +3600,10 @@ map-obj@^4.0.0:
3600
3600
resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.2.1.tgz#e4ea399dbc979ae735c83c863dd31bdf364277b7"
3601
3601
integrity sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ==
3602
3602
3603
- markdown-it-anchor@^7 .1.0 :
3604
- version "7 .1.0 "
3605
- resolved "https://registry.yarnpkg.com/markdown-it-anchor/-/markdown-it-anchor-7 .1.0 .tgz#30fb21497bf59e83ff4d1ddc052d821962e2489e "
3606
- integrity sha512-loQggrwsIkkP7TOrESvmYkV2ikbQNNKhHcWyqC7/C2CmfHl1tkUizJJU8C5aGgg7J6oXVQJx17gk7i47tNn/lQ ==
3603
+ markdown-it-anchor@^8 .1.2 :
3604
+ version "8 .1.2 "
3605
+ resolved "https://registry.yarnpkg.com/markdown-it-anchor/-/markdown-it-anchor-8 .1.2 .tgz#1f26b102005cb7750d5159d06ba3cfa9400ebc3d "
3606
+ integrity sha512-9D58TKK4dakqmjcmVuqHoB3ntKBpQJ0Ld38B83aiHJcBD72IZIyPjNtihPA6ayRI5WD33e1W68mArliNLHCprg ==
3607
3607
3608
3608
markdown-it-container@^3.0.0 :
3609
3609
version "3.0.0"
You can’t perform that action at this time.
0 commit comments