mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 07:04:45 -04:00
Use original markdown-it-anchor (#914)
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
parent
527df561ef
commit
005597e880
3 changed files with 8 additions and 8 deletions
|
@ -4,8 +4,8 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import anchor from '@mrdrogdrog/markdown-it-anchor'
|
||||
import MarkdownIt from 'markdown-it'
|
||||
import anchor from 'markdown-it-anchor'
|
||||
|
||||
export const headlineAnchors: MarkdownIt.PluginSimple = (markdownIt) => {
|
||||
const options: anchor.AnchorOptions = {
|
||||
|
@ -13,7 +13,7 @@ export const headlineAnchors: MarkdownIt.PluginSimple = (markdownIt) => {
|
|||
permalinkBefore: true,
|
||||
permalinkClass: 'heading-anchor text-dark',
|
||||
permalinkSymbol: '<i class="fa fa-link"></i>',
|
||||
permalinkHref: (slug: string): string => slug
|
||||
permalinkHref: (slug: string): string => `#${slug}`
|
||||
}
|
||||
|
||||
anchor(markdownIt, options)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue