rehype-header-linksを追加
This commit is contained in:
parent
94f40c51e0
commit
18a08efa6a
4 changed files with 7 additions and 1 deletions
|
@ -245,7 +245,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
& .marker {
|
||||
& .marker a{
|
||||
text-decoration: line-through;
|
||||
text-decoration-thickness: 1.125em;
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ import rehypeHighlight from 'rehype-highlight'
|
|||
import rehypeExternalLinks from 'rehype-external-links'
|
||||
import rehypeGithubAlert from 'rehype-github-alert'
|
||||
import rehypeStringify from 'rehype-stringify'
|
||||
import rehypeHeaderLinks from 'rehype-header-links'
|
||||
|
||||
|
||||
function Perser(mdtext: string): string {
|
||||
|
@ -24,6 +25,7 @@ function Perser(mdtext: string): string {
|
|||
.use(rehypeHighlight) // Syntax highlight
|
||||
.use(rehypeExternalLinks, {target:'_blank', rel:['noreferrer','noopener']}) // 外部サイトを新規タブで開く
|
||||
.use(rehypeGithubAlert)
|
||||
.use(rehypeHeaderLinks, {style: {color:'inherit'}})
|
||||
.use(rehypeStringify, {allowDangerousHtml: true})
|
||||
.processSync(mdtext)
|
||||
.toString()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue