Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

exmarkdown-heading-anchor

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

exmarkdown-heading-anchor

A svelte-exmarkdown plugin that places anchors in heading tags.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
76
increased by1166.67%
Maintainers
1
Weekly downloads
 
Created
Source

exmarkdown-heading-anchor

npm-version npm-license npm-download-month npm-min-size ci.yml deploy.yml

A svelte-exmarkdown plugin that places anchors in heading tags.

svelte-exmarkdown

Demo

By using this plugin, convert Markdown as follows.

# Heading1

## Heading2

### Heading3

<h1 id="Heading1">Heading1</h1>
<h2 id="Heading2">Heading2</h2>
<h3 id="Heading3">Heading3</h2>

Install

npm i exmarkdown-heading-anchor

Example

<script>
  import { headingAnchor } from 'exmarkdown-heading-anchor'
  import { Markdown } from 'svelte-exmarkdown'

  // ...
</script>

<Markdown
  md={/*...*/}
  plugins={[
    // ...
    headingAnchor({
      // Configuration (optional)
    })
  ]}
/>

Plugin Config Types

Known limitations

The attribute is added when the component is mounted, so the HTML rendered server-side does not have an id attribute.

Keywords

FAQs

Package last updated on 26 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc