Download the PHP package marquage/parsedownanchors without Composer
On this page you can find all versions of the php package marquage/parsedownanchors. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download marquage/parsedownanchors
More information about marquage/parsedownanchors
Files in marquage/parsedownanchors
Package parsedownanchors
Short Description extends Parsedown-extra to automatically add id anchors with unique slugs
License MIT
Homepage https://github.com/parsedownanchors/parsedownanchors
Informations about the package parsedownanchors
ParsedownAnchors
This tiny extension is part of the larger markdown-driven note-taking site. Although it is primarily aimed for building table of contents, this package accomplishes two things only:
- It automatically generates id-anchors for headers (h1-h6), using Cocur/Slugify. It does not require writing down header slugs ahead of time.
- It ensures that each id is unique. From the simple included test:
will turn to:
For the larger project that relies on the excellent Tocbot, that's all that was needed but I could not find an extension that addressed these simple concerns. There are other packages for Parsedown TOC, such as these two.
Install
Via Composer
Usage
In the unlikely case that you would only need this tiny package, you can call it instead of Parsedown since it is an extension and you would have access to all the rich features of Parsedown-extra.
Testing
Credits
License
The MIT License (MIT). Please see License File for more information.